Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): enhance garbage collector cronjob #372

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions helm/kube-image-keeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down