Merge "controller_manager: Add pod/container security context"

This commit is contained in:
Zuul
2019-05-07 22:19:14 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ spec:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec:
{{ dict "envAll" $envAll "application" "kubernetes" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector:
{{ .Values.labels.controller_manager.node_selector_key }}: {{ .Values.labels.controller_manager.node_selector_value }}
dnsPolicy: {{ .Values.anchor.dns_policy }}
@@ -62,6 +63,7 @@ spec:
- name: 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 }}
{{ dict "envAll" $envAll "application" "kubernetes" "container" "anchor" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/bin/anchor
lifecycle:

View File

@@ -78,6 +78,13 @@ dependencies:
controller_manager:
pod:
security_context:
kubernetes:
pod:
runAsUser: 0
container:
anchor:
readOnlyRootFilesystem: true
mounts:
controller_manager:
init_container: null