Merge "Implement Security Context for Deckhand"

This commit is contained in:
Zuul 2019-04-19 14:14:41 +00:00 committed by Gerrit Code Review
commit 81b2badca5
2 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,7 @@ spec:
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec:
serviceAccountName: {{ $serviceAccountName }}
{{ dict "envAll" $envAll "application" "deckhand" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector:
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.deckhand.timeout | default "30" }}
@ -62,6 +63,7 @@ spec:
image: {{ .Values.images.tags.deckhand }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "deckhand" "container" "deckhand_api" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
ports:
- containerPort: {{ tuple "deckhand" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
livenessProbe:

View File

@ -325,6 +325,14 @@ conf:
formatter_simple:
format: "%(asctime)s.%(msecs)03d %(process)d %(levelname)s: %(message)s"
pod:
security_context:
deckhand:
pod:
runAsUser: 65534
container:
deckhand_api:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
mounts:
deckhand_db_init:
init_container: null