Couldn't parse image reference "registry.connect.redhat.com/gitlab/gitlab-runner@0000"
Summary
Every gitlab images are pulled with @0000 as image hash resulting in failed deployment
Platform
- Openshift 4.7.13
- Gitlab 13.7.3
Steps to reproduce
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: gitlab-runner-operator-grp
namespace: test-ns
spec:
targetNamespaces:
- test-ns
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: gitlab-runner-operator-sub
namespace: test-ns
spec:
channel: beta
installPlanApproval: Automatic
name: gitlab-runner-operator
source: certified-operators
sourceNamespace: openshift-marketplace
---
apiVersion: apps.gitlab.com/v1beta2
kind: Runner
metadata:
name: gitlab-runner
namespace: test-ns
spec:
buildImage: ubi8
config: gitlab-runner-config
env: gitlab-runner-envs
gitlabUrl: '<SELF-MANAGED GITLAB URL>'
tags: openshift
token: gitlab-runner-secret
---
kind: Secret
apiVersion: v1
metadata:
name: gitlab-runner-secret
namespace: test-ns
data:
runner-registration-token: <BASE64_REGISTRATION-TOKEN>
type: Opaque
---
kind: ConfigMap
apiVersion: v1
metadata:
name: gitlab-runner-config
namespace: test-ns
data:
config.toml: |-
[[runners]]
[runners.kubernetes]
[runners.kubernetes.volumes]
[[runners.kubernetes.volumes.empty_dir]]
name = "empty-dir"
mount_path = "/mnt/workdir"
medium = "Memory"
---
kind: ConfigMap
apiVersion: v1
metadata:
name: gitlab-runner-envs
namespace: test-ns
data:
HOME: /mnt/workdir
Resulting runner deployments :
kind: Deployment
apiVersion: apps/v1
metadata:
name: gitlab-runner-runner
namespace: test-ns
ownerReferences:
- apiVersion: apps.gitlab.com/v1beta2
kind: Runner
name: gitlab-runner
uid: 2d4b3eb2-674d-4a70-8634-39b31f0f4f9e
controller: true
blockOwnerDeletion: true
labels:
app.kubernetes.io/component: runner
app.kubernetes.io/instance: gitlab-runner-runner
app.kubernetes.io/managed-by: gitlab-runner-operator
app.kubernetes.io/name: gitlab-runner
app.kubernetes.io/part-of: runner
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: runner
app.kubernetes.io/instance: gitlab-runner-runner
app.kubernetes.io/managed-by: gitlab-runner-operator
app.kubernetes.io/name: gitlab-runner
app.kubernetes.io/part-of: runner
template:
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: runner
app.kubernetes.io/instance: gitlab-runner-runner
app.kubernetes.io/managed-by: gitlab-runner-operator
app.kubernetes.io/name: gitlab-runner
app.kubernetes.io/part-of: runner
annotations:
gitlab-runner-runner-config: 6d0fe838efaa679e508eb7fbe24458e5fdbc51d1117faca4a590b3532b1c7316
spec:
restartPolicy: Always
initContainers:
- resources: {}
terminationMessagePath: /dev/termination-log
name: configure
command:
- sh
- /config/configure
env:
- name: CI_SERVER_URL
valueFrom:
configMapKeyRef:
name: gitlab-runner-runner-config
key: ci_server_url
- name: CI_SERVER_TOKEN
valueFrom:
secretKeyRef:
name: gitlab-runner-secret
key: runner-token
- name: REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: gitlab-runner-secret
key: runner-registration-token
- name: RUNNER_REQUEST_CONCURRENCY
value: '1'
- name: RUNNER_EXECUTOR
value: kubernetes
- name: REGISTER_LOCKED
value: 'false'
- name: RUNNER_OUTPUT_LIMIT
value: '4096'
- name: KUBERNETES_NAMESPACE
value: test-ns
- name: KUBERNETES_POLL_TIMEOUT
value: '180'
- name: CACHE_SHARED
value: 'false'
- name: KUBERNETES_HELPER_IMAGE
value: registry.connect.redhat.com/gitlab/gitlab-runner-helper@0000
- name: RUNNER_TAG_LIST
value: openshift
- name: KUBERNETES_IMAGE
value: ubi8
- name: HOME
value: /mnt/workdir
imagePullPolicy: IfNotPresent
volumeMounts:
- name: runner-secrets
mountPath: /secrets
- name: scripts
readOnly: true
mountPath: /config
- name: init-runner-secrets
readOnly: true
mountPath: /init-secrets
terminationMessagePolicy: File
image: registry.connect.redhat.com/gitlab/gitlab-runner@0000
serviceAccountName: gitlab-runner-sa
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
securityContext: {}
containers:
- resources: {}
readinessProbe:
exec:
command:
- /bin/bash
- /scripts/check-live
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
terminationMessagePath: /dev/termination-log
lifecycle:
preStop:
exec:
command:
- gitlab-runner
- unregister
- '--all-runners'
name: runner
command:
- /bin/bash
- /scripts/entrypoint
livenessProbe:
exec:
command:
- /bin/bash
- /scripts/check-live
initialDelaySeconds: 60
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
env:
- name: CI_SERVER_URL
valueFrom:
configMapKeyRef:
name: gitlab-runner-runner-config
key: ci_server_url
- name: CI_SERVER_TOKEN
valueFrom:
secretKeyRef:
name: gitlab-runner-secret
key: runner-token
- name: REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: gitlab-runner-secret
key: runner-registration-token
- name: RUNNER_REQUEST_CONCURRENCY
value: '1'
- name: RUNNER_EXECUTOR
value: kubernetes
- name: REGISTER_LOCKED
value: 'false'
- name: RUNNER_OUTPUT_LIMIT
value: '4096'
- name: KUBERNETES_NAMESPACE
value: test-ns
- name: KUBERNETES_POLL_TIMEOUT
value: '180'
- name: CACHE_SHARED
value: 'false'
- name: KUBERNETES_HELPER_IMAGE
value: registry.connect.redhat.com/gitlab/gitlab-runner-helper@0000
- name: RUNNER_TAG_LIST
value: openshift
- name: KUBERNETES_IMAGE
value: ubi8
- name: HOME
value: /mnt/workdir
imagePullPolicy: IfNotPresent
volumeMounts:
- name: runner-secrets
mountPath: /secrets
- name: scripts
mountPath: /scripts
terminationMessagePolicy: File
image: registry.connect.redhat.com/gitlab/gitlab-runner@0000
serviceAccount: gitlab-runner-sa
volumes:
- name: runner-secrets
emptyDir:
medium: Memory
- name: init-runner-secrets
projected:
sources:
- secret:
name: gitlab-runner-secret
items:
- key: runner-registration-token
path: runner-registration-token
- key: runner-token
path: runner-token
defaultMode: 420
- name: scripts
configMap:
name: gitlab-runner-runner-config
items:
- key: config.toml
path: config.toml
- key: entrypoint
path: entrypoint
- key: register-runner
path: register-runner
- key: check-live
path: check-live
- key: configure
path: configure
defaultMode: 420
dnsPolicy: ClusterFirst
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
status:
observedGeneration: 2
replicas: 2
updatedReplicas: 1
unavailableReplicas: 2
conditions:
- type: Available
status: 'False'
lastUpdateTime: '2021-06-09T08:59:36Z'
lastTransitionTime: '2021-06-09T08:59:36Z'
reason: MinimumReplicasUnavailable
message: Deployment does not have minimum availability.
- type: Progressing
status: 'True'
lastUpdateTime: '2021-06-09T09:42:38Z'
lastTransitionTime: '2021-06-09T09:42:37Z'
reason: ReplicaSetUpdated
message: ReplicaSet "gitlab-runner-runner-844d988d9d" is progressing.
Errors
Failed to apply default image tag "registry.connect.redhat.com/gitlab/gitlab-runner@0000": couldn't parse image reference "registry.connect.redhat.com/gitlab/gitlab-runner@0000": invalid reference format
Edited by Cyril MARIN