apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: ms-continuus
  namespace: ms-continuus
  labels:
    app: ms-continuus
spec:
  # Every sunday at 18:15
  schedule: '15 18 * * 7'
  # No parallel jobs
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      backoffLimit: 1
      template:
        spec:
          containers:
            - name: ms-continuus
              image: ghcr.io/equinor/ms-continuus:main
              imagePullPolicy: Always
              env:
                - name: BLOB_CONTAINER
                  value: github-archives
                - name: GITHUB_ORG
                  value: equinor
                - name: STORAGE_KEY
                  valueFrom:
                    secretKeyRef:
                      name: ms-continuus
                      key: STORAGE_KEY
                - name: GITHUB_TOKEN
                  valueFrom:
                    secretKeyRef:
                      name: ms-continuus
                      key: GITHUB_TOKEN
          restartPolicy: Never
