apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: tasks-params
spec:
  schedule: "20 */1 * * *"
  suspend: false
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: wfms-tasks-params
              image: atlasanalyticsservice/wfms:latest
              command: ["Tasks/run_params.sh"]
              env:
                - name: JOB_ORACLE_USER
                  valueFrom:
                    secretKeyRef:
                      name: oracle-secret
                      key: job_oracle_user
                - name: JOB_ORACLE_PASS
                  valueFrom:
                    secretKeyRef:
                      name: oracle-secret
                      key: job_oracle_pass
                - name: JOB_ORACLE_CONNECTION_STRING
                  valueFrom:
                    secretKeyRef:
                      name: oracle-secret
                      key: job_oracle_connection_string
                - name: ES_USER
                  valueFrom:
                    secretKeyRef:
                      name: es-auth-fts
                      key: es_user
                - name: ES_PASS
                  valueFrom:
                    secretKeyRef:
                      name: es-auth-fts
                      key: es_pass
                - name: ES_HOST
                  valueFrom:
                    secretKeyRef:
                      name: es-auth-fts
                      key: es_host
          restartPolicy: Never
