apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: elasticsearch-curator
spec:
  schedule: 1 0 * * *
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: curator
            image: quay.io/pires/docker-elasticsearch-curator:5.5.1
            args:
            - --config
            - /etc/config/config.yml
            - /etc/config/action_file.yml
            volumeMounts:
              - name: config-volume
                mountPath: /etc/config
          volumes:
            - name: config-volume
              configMap:
                name: elasticsearch-curator-config
          restartPolicy: OnFailure