Merge "Calicoctl-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 d7a6cfd6b2
2 changed files with 10 additions and 5 deletions

View File

@ -111,9 +111,7 @@ spec:
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
{{ tuple . | include "helm-toolkit.snippets.release_uuid" | indent 8}}
spec:
securityContext:
runAsUser: {{ $envAll.Values.pod.sec_context.run_as_user }}
allowPrivilegeEscalation: false
{{ dict "envAll" $envAll "application" "calicoctl_util" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
serviceAccountName: {{ $serviceAccountName }}
nodeSelector:
{{ .Values.labels.utility.node_selector_key }}: {{ .Values.labels.utility.node_selector_value }}
@ -121,6 +119,7 @@ spec:
- name: {{ printf "%s" $envAll.Release.Name }}
{{ tuple $envAll "calicoctl_utility" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.calicoctl_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "calicoctl_util" "container" "calicoctl_utility" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- "bootstrap.sh"
readinessProbe:

View File

@ -30,6 +30,14 @@ images:
- calicoctl_utility
pod:
security_context:
calicoctl_util:
pod:
runAsUser: 65534
container:
calicoctl_utility:
allowPrivilegeEscalation: true
readOnlyRootFilesystem: false
resources:
enabled: true
jobs:
@ -50,8 +58,6 @@ pod:
dns_policy: "ClusterFirstWithHostNet"
replicas:
utility: 1
sec_context:
run_as_user: 65534
release_group: null