Skip to content

Commit 36b5752

Browse files
TomHenningdonch
authored andcommitted
feat(helm): securityContext for garbage collection pod
1 parent c3c4aa7 commit 36b5752

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

helm/kube-image-keeper/templates/garbage-collection-cron-job.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ spec:
3232
tolerations:
3333
{{- toYaml . | nindent 12 }}
3434
{{- end }}
35+
securityContext:
36+
{{- toYaml .Values.registry.garbageCollection.podSecurityContext | nindent 12 }}
3537
containers:
3638
- name: kubectl
39+
securityContext:
40+
{{- toYaml .Values.registry.garbageCollection.securityContext | nindent 16 }}
3741
image: "{{ .Values.registry.garbageCollection.image.repository }}:{{ .Values.registry.garbageCollection.image.tag }}"
3842
resources:
3943
{{- toYaml .Values.registry.garbageCollection.resources | nindent 16 }}

helm/kube-image-keeper/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ registry:
239239
schedule: "0 0 * * 0"
240240
# -- If true, delete untagged manifests. Default to false since there is a known bug in **docker distribution** garbage collect job.
241241
deleteUntagged: false
242+
# -- Security context for the garbage collector pod
243+
podSecurityContext: {}
244+
# -- Security context for containers of the garbage collector pod
245+
securityContext: {}
242246
# -- Specify a nodeSelector for the garbage collector pod
243247
nodeSelector: {}
244248
# -- Affinity for the garbage collector pod

0 commit comments

Comments
 (0)