# Source: jxboot-helmfile-resources/templates/upgrade-cj.yaml
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: jx-boot-upgrade
  labels:
    app: jenkins-x-updatebot
    release: jx
    gitops.jenkins-x.io/pipeline: 'namespaces'
  annotations:
    meta.helm.sh/release-name: 'jxboot-helmfile-resources'
  namespace: jx
spec:
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      backoffLimit: 1
      template:
        metadata:
          labels:
            app: jenkins-x-updatebot
        spec:
          initContainers:
            - command:
                - jx
                - secret
                - copy
                - --name
                - jx-boot-job-env-vars
                - --ns
                - jx-git-operator
                - --to
                - jx
              name: copy-secret
              image: "ghcr.io/jenkins-x/jx-boot:3.2.338"
              imagePullPolicy: Always
              resources: {}
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
          containers:
            - args:
                - env
                - --git-setup
                - --auto-merge
              command:
                - jx-updatebot
              env:
                - name: GIT_SECRET_MOUNT_PATH
                  value: /secrets/git
              envFrom:
                - secretRef:
                    name: jx-boot-job-env-vars
                    optional: true
              image: "ghcr.io/jenkins-x/jx-updatebot:0.1.5"
              imagePullPolicy: Always
              name: updatebot
              resources: {}
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
              volumeMounts:
                - mountPath: /secrets/git
                  name: secrets-git
          dnsPolicy: ClusterFirst
          restartPolicy: Never
          schedulerName: default-scheduler
          securityContext: {}
          terminationGracePeriodSeconds: 30
          serviceAccountName: tekton-bot
          volumes:
            - name: secrets-git
              secret:
                defaultMode: 420
                secretName: tekton-git
  successfulJobsHistoryLimit: 3
  schedule: "0 0 * * *"
  suspend: false
