apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: kubesnapshot
spec:
  # everyday 00:00 UTC
  schedule: "0 0 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: kubesnapshot
              image: int128/kubesnapshot:latest
              env:
                - name: KUBE_CLUSTER_NAME
                  valueFrom:
                    configMapKeyRef:
                      name: kubesnapshot
                      key: KUBE_CLUSTER_NAME
                # - name: RETAIN_SNAPSHOTS
                #   value: "5"
                # - name: DRY_RUN
                #   value: "false"
          restartPolicy: Never
      backoffLimit: 3
