apiVersion: batch/v1beta1
kind: CronJob
metadata:
  namespace: kube-system
  name: kube-dumper
spec:
  schedule: "*/1 * * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      activeDeadlineSeconds: 3600
      template:
        spec:
          serviceAccountName: kube-dumper
          restartPolicy: OnFailure
          containers:
            - name: kube-dumper
              image: inloco/kube-dumper:v1.0.3
              env:
                - name: AWS_ACCESS_KEY_ID
                  valueFrom:
                    secretKeyRef:
                      name: kube-dumper
                      key: AWS_ACCESS_KEY_ID
                - name: AWS_SECRET_ACCESS_KEY
                  valueFrom:
                    secretKeyRef:
                      name: kube-dumper
                      key: AWS_SECRET_ACCESS_KEY
                - name: CODECOMMIT_HTTPS
                  valueFrom:
                    configMapKeyRef:
                      name: kube-dumper
                      key: CODECOMMIT_HTTPS
              resources:
                requests:
                  ephemeral-storage: 64Mi
