diff --git a/cinder/templates/job-clean.yaml b/cinder/templates/job-clean.yaml index ca06906292..f1310c662e 100755 --- a/cinder/templates/job-clean.yaml +++ b/cinder/templates/job-clean.yaml @@ -60,6 +60,7 @@ spec: {{ tuple $envAll "cinder" "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: cinder-volume-rbd-secret-clean {{ tuple $envAll "cinder_storage_init" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.clean | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" $envAll "application" "clean" "container" "cinder_volume_rbd_secret_clean" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} env: - name: NAMESPACE valueFrom: diff --git a/cinder/values.yaml b/cinder/values.yaml index 6b78dc62c0..2f088546f6 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -151,6 +151,13 @@ pod: cinder_backup_storage_init: readOnlyRootFilesystem: true allowPrivilegeEscalation: false + clean: + pod: + runAsUser: 42424 + container: + cinder_volume_rbd_secret_clean: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false create_internal_tenant: pod: runAsUser: 42424