apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: xcache
  namespace: aaas
spec:
  schedule: "*/30 * * * *"
  suspend: false
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: aaas-container
              image: atlasanalyticsservice/alarmandalertservice:v21.08.26.v2
              imagePullPolicy: IfNotPresent
              command: ["/xcache.sh"]
              env:
                - name: MAILGUN_API_KEY
                  valueFrom:
                    secretKeyRef:
                      name: mailgun-secret
                      key: api-key
              volumeMounts:
                - name: config-volume
                  mountPath: "/config"
                  readOnly: true
          volumes:
            - name: config-volume
              secret:
                secretName: config
          restartPolicy: Never
