diff --git a/helm/kube-image-keeper/templates/garbage-collection-cron-job.yaml b/helm/kube-image-keeper/templates/garbage-collection-cron-job.yaml index 10f8ba06..110ca590 100644 --- a/helm/kube-image-keeper/templates/garbage-collection-cron-job.yaml +++ b/helm/kube-image-keeper/templates/garbage-collection-cron-job.yaml @@ -20,9 +20,15 @@ spec: spec: serviceAccountName: {{ include "kube-image-keeper.fullname" . }}-registry-restart restartPolicy: Never + {{- with .Values.registry.garbageCollection.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 12 }} + {{- end }} containers: - name: kubectl image: "{{ .Values.registry.garbageCollection.image.repository }}:{{ .Values.registry.garbageCollection.image.tag }}" + resources: + {{- toYaml .Values.registry.garbageCollection.resources | nindent 16 }} imagePullPolicy: {{ .Values.registry.garbageCollection.image.pullPolicy }} command: - bash diff --git a/helm/kube-image-keeper/values.yaml b/helm/kube-image-keeper/values.yaml index 939cde73..eab9845f 100644 --- a/helm/kube-image-keeper/values.yaml +++ b/helm/kube-image-keeper/values.yaml @@ -230,6 +230,20 @@ registry: schedule: "0 0 * * 0" # -- If true, delete untagged manifests. Default to false since there is a known bug in **docker distribution** garbage collect job. deleteUntagged: false + # -- Specify a nodeSelector for the garbage collector pod + nodeSelector: {} + # -- Resources settings for the garbage collector pod + resources: + requests: + # -- Cpu requests for the garbage collector pod + cpu: "10m" + # -- Memory requests for the garbage collector pod + memory: "10Mi" + limits: + # -- Cpu limits for the garbage collector pod + cpu: "1" + # -- Memory limits for the garbage collector pod + memory: "512Mi" image: # -- Cronjob image repository repository: bitnami/kubectl