apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: private-cluster-rhapi-apischeme-updater-cronjob
  annotations:
    description: private-cluster-rhapi-apischeme-updater-cronjob
  labels:
    app: private-cluster-rhapi-apischeme-updater
spec:
  failedJobsHistoryLimit: 5
  successfulJobsHistoryLimit: 3
  concurrencyPolicy: Replace
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          serviceAccountName: private-cluster-rhapi-apischeme-updater
          restartPolicy: Never
          containers:
          - name: private-cluster-rhapi-apischeme-updater
            image: "${REGISTRY_IMG}:${IMAGE_TAG}"
            imagePullPolicy: Always
            env:
            - name: aws_access_key_id
              valueFrom:
                secretKeyRef:
                  name: pr-gateway
                  key: aws_access_key_id
            - name: aws_secret_access_key
              valueFrom:
                secretKeyRef:
                  name: pr-gateway
                  key: aws_secret_access_key
            - name: aws_region
              valueFrom:
                secretKeyRef:
                  name: pr-gateway
                  key: aws_region
            - name: queue_url
              valueFrom:
                secretKeyRef:
                  name: pr-gateway
                  key: gitlab_pr_submitter_queue_url
