Add missing security context to Cinder pods/containers
This updates the cinder chart to include the pod security context on the pod template. This also adds the container security context to set readOnlyRootFilesystem flag to true Change-Id: Ia6e3c56087bae6f8c86db688404c6ce3a1d5d99d
This commit is contained in:
parent
e56deaf464
commit
711631d664
@ -60,6 +60,7 @@ spec:
|
|||||||
{{ tuple $envAll "cinder" "clean" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll "cinder" "clean" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
{{ dict "envAll" $envAll "application" "clean" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
@ -70,6 +71,7 @@ spec:
|
|||||||
- name: cinder-volume-rbd-secret-clean
|
- name: cinder-volume-rbd-secret-clean
|
||||||
{{ tuple $envAll "cinder_storage_init" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ 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 }}
|
{{ 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:
|
env:
|
||||||
- name: NAMESPACE
|
- name: NAMESPACE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -151,6 +151,13 @@ pod:
|
|||||||
cinder_backup_storage_init:
|
cinder_backup_storage_init:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
|
clean:
|
||||||
|
pod:
|
||||||
|
runAsUser: 42424
|
||||||
|
container:
|
||||||
|
cinder_volume_rbd_secret_clean:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
create_internal_tenant:
|
create_internal_tenant:
|
||||||
pod:
|
pod:
|
||||||
runAsUser: 42424
|
runAsUser: 42424
|
||||||
|
Loading…
x
Reference in New Issue
Block a user