From 06409fcbd66101cc8696ca862665ca3062a8d971 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 14 May 2021 14:54:58 +0200 Subject: [PATCH] ci: add CronJob for automated image mirroring in the CI registry Signed-off-by: Niels de Vos --- mirror/mirror-cronjob.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 mirror/mirror-cronjob.yaml diff --git a/mirror/mirror-cronjob.yaml b/mirror/mirror-cronjob.yaml new file mode 100644 index 000000000..4f0874a2b --- /dev/null +++ b/mirror/mirror-cronjob.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: mirror-images + labels: + app: mirror-images +spec: + schedule: '@daily' + jobTemplate: + spec: + template: + metadata: + labels: + app: mirror-images + spec: + containers: + - name: mirror-images + image: image-registry.openshift-image-registry.svc:5000/ceph-csi/mirror-images:latest + env: + - name: DOCKER_CONFIG_JSON + valueFrom: + secretKeyRef: + name: cephcsibot-docker-io + key: .dockerconfigjson + - name: CI_REGISTRY_USER + valueFrom: + secretKeyRef: + name: container-registry-auth + key: username + - name: CI_REGISTRY_PASSWD + valueFrom: + secretKeyRef: + name: container-registry-auth + key: passwd + restartPolicy: OnFailure