controller_manager: Add pod/container security context
This updates the controller_manager chart to include the pod security context on the pod template This also adds the container security context to set readOnlyRootFilesystem to true Change-Id: Icee324ef7ddbd230c7c99f4dc284e2866d9acf1a
This commit is contained in:
parent
b6c3decf22
commit
34aca639f0
|
@ -42,6 +42,7 @@ spec:
|
||||||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
spec:
|
spec:
|
||||||
|
{{ dict "envAll" $envAll "application" "kubernetes" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.controller_manager.node_selector_key }}: {{ .Values.labels.controller_manager.node_selector_value }}
|
{{ .Values.labels.controller_manager.node_selector_key }}: {{ .Values.labels.controller_manager.node_selector_value }}
|
||||||
dnsPolicy: {{ .Values.anchor.dns_policy }}
|
dnsPolicy: {{ .Values.anchor.dns_policy }}
|
||||||
|
@ -62,6 +63,7 @@ spec:
|
||||||
- name: ETC_PATH
|
- name: ETC_PATH
|
||||||
value: /host{{ .Values.controller_manager.host_etc_path }}
|
value: /host{{ .Values.controller_manager.host_etc_path }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.anchor_pod | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.anchor_pod | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
{{ dict "envAll" $envAll "application" "kubernetes" "container" "anchor" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
command:
|
command:
|
||||||
- /tmp/bin/anchor
|
- /tmp/bin/anchor
|
||||||
lifecycle:
|
lifecycle:
|
||||||
|
|
|
@ -78,6 +78,13 @@ dependencies:
|
||||||
controller_manager:
|
controller_manager:
|
||||||
|
|
||||||
pod:
|
pod:
|
||||||
|
security_context:
|
||||||
|
kubernetes:
|
||||||
|
pod:
|
||||||
|
runAsUser: 0
|
||||||
|
container:
|
||||||
|
anchor:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
mounts:
|
mounts:
|
||||||
controller_manager:
|
controller_manager:
|
||||||
init_container: null
|
init_container: null
|
||||||
|
|
Loading…
Reference in New Issue