Merge "Coredns: Add pod/container security context"

This commit is contained in:
Zuul 2019-06-21 20:26:08 +00:00 committed by Gerrit Code Review
commit 59c27d76ab
2 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,7 @@ spec:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" $envAll | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" $envAll | include "helm-toolkit.utils.hash" }}
spec:
{{ dict "envAll" $envAll "application" "coredns" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
serviceAccountName: coredns
shareProcessNamespace: true
tolerations:
@ -84,6 +85,7 @@ spec:
image: {{ $envAll.Values.images.tags.coredns | quote }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy | quote }}
{{ tuple $envAll $envAll.Values.pod.resources.coredns | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
{{ dict "envAll" $envAll "application" "coredns" "container" "coredns" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 8 }}
args: [ "-conf", "/etc/coredns/Corefile" ]
volumeMounts:
- name: config-volume

View File

@ -36,6 +36,14 @@ service:
ip: 10.96.0.10
pod:
security_context:
coredns:
pod:
runAsUser: 65534
container:
coredns:
runAsUser: 0
readOnlyRootFilesystem: true
lifecycle:
upgrades:
# This is only meaningful when deploying as a DaemonSet