apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: curator
spec:
  schedule: 0 8 * * *
  jobTemplate:
    spec:
      ttlSecondsAfterFinished: 180
      template:
        spec:
          containers:
          - name: curator
            image: carlosedp/docker-elasticsearch-curator:5.6.0
            args:
            - --config
            - /etc/config/config.yml
            - /etc/config/action_file.yml
            volumeMounts:
              - name: config-volume
                mountPath: /etc/config
          volumes:
            - name: config-volume
              configMap:
                name: curator-config
          restartPolicy: OnFailure
