apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: delete-unused-configmaps
  namespace: k8s-pruner
spec:
  schedule: "0 1 * * *" # every day at 1AM
  jobTemplate:
    spec:
      template:
        spec:
          serviceAccountName: sa-prune-resources
          containers:
          - name: prune-configs
            image: mrkaran/k8s-pruner:latest
            command: ['./prune-cm.sh']
          restartPolicy: OnFailure
