Merge "Drydock: Add pod/container security context"

This commit is contained in:
Zuul 2019-04-03 15:50:06 +00:00 committed by Gerrit Code Review
commit 3b2388e20c
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,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" "drydock" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector:
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value | quote }}
serviceAccountName: {{ $serviceAccountName }}
@ -48,6 +49,7 @@ spec:
image: {{ .Values.images.tags.drydock }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "drydock" "container" "drydock_api" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
env:
- name: 'MAAS_API_KEY'
valueFrom:

View File

@ -55,6 +55,14 @@ network:
nginx.ingress.kubernetes.io/rewrite-target: /
pod:
security_context:
drydock:
pod:
runAsUser: 65534
container:
drydock_api:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
lifecycle:
upgrades:
deployments: