Merge "Add missing security context to Sonobuoy pods/containers"

This commit is contained in:
Zuul 2020-07-13 14:55:24 +00:00 committed by Gerrit Code Review
commit 3862eef51c
2 changed files with 10 additions and 0 deletions

View File

@ -63,6 +63,7 @@ metadata:
spec:
nodeSelector:
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value}}
{{ dict "envAll" $envAll "application" "sonobuoy" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }}
initContainers:
{{ tuple $envAll "sonobuoy" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
containers:
@ -73,6 +74,7 @@ spec:
fieldRef:
fieldPath: status.podIP
{{ tuple $envAll "sonobuoy_api" | include "helm-toolkit.snippets.image" | indent 4 }}
{{ dict "envAll" $envAll "application" "sonobuoy" "container" "kube_sonobuoy" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 4 }}
command:
- /run_master.sh
volumeMounts:

View File

@ -39,6 +39,14 @@ dependencies:
- sonobuoy-ks-user
pod:
security_context:
sonobuoy:
pod:
runAsUser: 1000
container:
kube_sonobuoy:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
resources:
enabled: false
jobs: