apiVersion: batch/v1
kind: CronJob
metadata:
  name: ef-reporting-connector-cron
  namespace: expertflow
spec:
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 1
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          imagePullSecrets:
          - name: expertflow-reg-cred
          containers:
            - image: gitimages.expertflow.com/cim/reporting-connector:4.2.1-FNB-1935
              name: ef-reporting-connector
              imagePullPolicy: IfNotPresent
          # resources:
          #   requests:
          #     memory: "64Mi"
          #     cpu: "50m"
          #   limits:
          #     memory: "256Mi"
          #     cpu: "100m"
              volumeMounts:
                - name: config-volume-conf
                  mountPath: /root/config/reporting-connector.conf
                  subPath: reporting-connector.conf
                - name: ef-reporting-connector-keystore
                  mountPath: /root/config/certs/mykeystore.jks
                  subPath: mykeystore.jks  
          volumes:
             - name: ef-reporting-connector-keystore
               configMap:
                 name: ef-reporting-connector-keystore-cm
                 optional: true
             - name: config-volume-conf
               configMap:
                 name: ef-reporting-connector-conf
                 optional: true
          restartPolicy: Never
      backoffLimit: 0
