apiVersion: batch/v1
kind: CronJob
metadata:
  name: import-images
spec:
  # https://crontab.guru
  # At 02:00 on Tuesday
  schedule: "0 2 * * 2"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: import-images
              image: quay.io/packit/import-images
              env:
                - name: KUBECONFIG
                  value: /tmp/.kube/config
                - name: HOST
                  value: https://api.auto-prod.gi0n.p1.openshiftapps.com:6443
                # - name: SERVICE
                #   value: stream
                #   value: fedora-source-git
                - name: DEPLOYMENT
                  value: prod
                - name: TOKEN
                  valueFrom:
                    secretKeyRef:
                      # packit-prod @ auto
                      name: importimager-token-gjfb6
                      # stream-prod @ auto
                      # name: importimager-token-lwwsk
                      # fedora-source-git-prod @ auto
                      # name: importimager-token-8wlrc
                      key: token
              resources:
                limits:
                  memory: "80Mi"
                  cpu: "100m"
          restartPolicy: OnFailure
