Merge "Ceph-utility: Add pod/container security context"

This commit is contained in:
Zuul 2019-11-26 15:36:22 +00:00 committed by Gerrit Code Review
commit 3e7441f0c0
2 changed files with 10 additions and 2 deletions

View File

@ -68,8 +68,7 @@ spec:
labels: labels:
{{ tuple $envAll "ceph" "utility" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} {{ tuple $envAll "ceph" "utility" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
securityContext: {{ dict "envAll" $envAll "application" "ceph" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
runAsUser: 65534
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
affinity: affinity:
{{ tuple $envAll "ceph" "utility" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} {{ tuple $envAll "ceph" "utility" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
@ -79,6 +78,7 @@ spec:
- name: {{ printf "%s" $envAll.Release.Name }} - name: {{ printf "%s" $envAll.Release.Name }}
{{ tuple $envAll "ceph_utility" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "ceph_utility" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.ceph_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.ceph_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "ceph" "container" "ceph_utility" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command: command:
- /tmp/bootstrap.sh - /tmp/bootstrap.sh
volumeMounts: volumeMounts:

View File

@ -39,6 +39,14 @@ labels:
node_selector_value: primary node_selector_value: primary
pod: pod:
security_context:
ceph:
pod:
runAsUser: 65534
container:
ceph_utility:
allowPrivilegeEscalation: true
readOnlyRootFilesystem: false
dns_policy: "ClusterFirstWithHostNet" dns_policy: "ClusterFirstWithHostNet"
replicas: replicas:
utility: 1 utility: 1