Merge "Promenade: Add security context for pod/container"

This commit is contained in:
Zuul 2019-04-17 17:58:03 +00:00 committed by Gerrit Code Review
commit 7422b92c2d
2 changed files with 10 additions and 0 deletions

View File

@ -34,6 +34,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" "promenade" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
affinity:
{{ tuple $envAll "promenade" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector:
@ -45,6 +46,7 @@ spec:
image: {{ .Values.images.tags.promenade }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "promenade" "container" "promenade_api" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /opt/promenade/entrypoint.sh
- server

View File

@ -157,6 +157,14 @@ endpoints:
default: null
pod:
security_context:
promenade:
pod:
runAsUser: 65534
container:
promenade_api:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
affinity:
anti:
type: