Add securitycontext settings on defaultbackend

Signed-off-by: Alexis Martinier <a.martinier@gmail.com>
This commit is contained in:
Alexis Martinier 2020-10-21 11:15:15 +02:00
parent fb6a03ffb4
commit 8c56e4df9d
2 changed files with 9 additions and 0 deletions

View file

@ -52,7 +52,13 @@ spec:
{{- end }}
{{- end }}
securityContext:
capabilities:
drop:
- ALL
runAsUser: {{ .Values.defaultBackend.image.runAsUser }}
runAsNonRoot: {{ .Values.defaultBackend.image.runAsNonRoot }}
allowPrivilegeEscalation: {{ .Values.defaultBackend.image.allowPrivilegeEscalation }}
readOnlyRootFilesystem: {{ .Values.defaultBackend.image.readOnlyRootFilesystem}}
{{- if .Values.defaultBackend.extraEnvs }}
env: {{ toYaml .Values.defaultBackend.extraEnvs | nindent 12 }}
{{- end }}

View file

@ -552,6 +552,9 @@ defaultBackend:
pullPolicy: IfNotPresent
# nobody user -> uid 65534
runAsUser: 65534
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
extraArgs: {}