apiVersion: v1
kind: Pod
metadata:
  generateName: image-pruner-
  labels:
    role: pruner
spec:
  containers:
  - image: getupcloud/imagepruner:latest
    name: pruner
    env:
      - name: KEEP_COMPLETE
        value: ${KEEP_COMPLETE}
      - name: KEEP_FAILED
        value: ${KEEP_FAILED}
      - name: KEEP_TAGS
        value: ${KEEP_TAGS}
      - name: KEEP_YOUNGER
        value: ${KEEP_YOUNGER}
      - name: PRUNE_EXTERNAL
        value: ${PRUNE_EXTERNAL}
  dnsPolicy: ClusterFirst
  restartPolicy: Never
  serviceAccount: image-pruner
  nodeSelector:
    role: infra
