diff --git a/glance/templates/job-clean.yaml b/glance/templates/job-clean.yaml index 43d7551cc5..cdcd61e700 100644 --- a/glance/templates/job-clean.yaml +++ b/glance/templates/job-clean.yaml @@ -60,6 +60,7 @@ spec: {{ tuple $envAll "glance" "clean" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} +{{ dict "envAll" $envAll "application" "clean" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} restartPolicy: OnFailure nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} @@ -70,6 +71,7 @@ spec: - name: glance-secret-clean {{ tuple $envAll "glance_storage_init" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" $envAll "application" "clean" "container" "glance_secret_clean" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} env: - name: NAMESPACE valueFrom: diff --git a/glance/values.yaml b/glance/values.yaml index 4703db6181..39518aea40 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -847,6 +847,13 @@ pod: glance_registry: readOnlyRootFilesystem: true allowPrivilegeEscalation: false + clean: + pod: + runAsUser: 42424 + container: + glance_secret_clean: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false metadefs_load: pod: runAsUser: 42424