kind: CronJob
apiVersion: batch/v1beta1
metadata:
  name: jira-daily-diff-git-build-watcher
  annotations:
    app.openshift.io/vcs-ref: master
    app.openshift.io/vcs-uri: 'https://github.com/openshift/bugzilla-tools.git'
    image.openshift.io/triggers: >-
      [{"from":{"kind":"ImageStreamTag","name":"git-build-watcher:latest","namespace":"ocp-eng-architects"},"fieldPath":"spec.template.spec.containers[?(@.name==\"jira-daily-diff-git-build-watcher\")].image","pause":"false"}]
  labels:
    app: jira-daily-diff-git-build-watcher
    app.kubernetes.io/component: jira-daily-diff-git-build-watcher
    app.kubernetes.io/instance: jira-daily-diff-git-build-watcher
    app.kubernetes.io/part-of: openshift-bugzilla-tools
spec:
  concurrencyPolicy: Forbid
  schedule: '*/5 * * * *'
  startingDeadlineSeconds: 3600
  jobTemplate:
    metadata:
      labels:
        app: jira-daily-diff-git-build-watcher
        app.kubernetes.io/component: jira-daily-diff-git-build-watcher
        app.kubernetes.io/instance: jira-daily-diff-git-build-watcher
        app.kubernetes.io/part-of: openshift-bugzilla-tools
    spec:
      template:
        spec:
          containers:
            - name: jira-daily-diff-git-build-watcher
              image: image-registry.openshift-image-registry.svc:5000/ocp-eng-architects/git-build-watcher:latest
              command:
                - /git-build-watcher
                - -v=2
                - jira-daily-diff
              resources:
                requests:
                  memory: "50Mi"
                  cpu: "10m"
                limits:
                  memory: "50Mi"
                  cpu: "10m"
              resources: {}
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
              imagePullPolicy: Always
          restartPolicy: OnFailure
          serviceAccountName: git-build-watcher
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1
