apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: curator
spec:
  schedule: "0 2 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: curator
            image: reg.cnrancher.com/logging/logging-curator:v0.0.1
            command: ["curator", "--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