apiVersion: batch/v1
kind: Job
metadata:
  name: sync-failure
  annotations:
    argocd.argoproj.io/hook: SyncFail
spec:
  ttlSecondsAfterFinished: 600
  template:
    spec:
      restartPolicy: Never
      containers:
        - name: sync
          image: quay.io/ibmgaragecloud/ibmcloud-dev
          command:
            - "/bin/echo"
          args:
            - "Sync failure: ${DEPLOYMENT}"
          env:
            - name: SERVICE_NOW_URL
              value: ""
            - name: DEPLOYMENT
              value: nginx
