Add CAP_SYS_CHROOT to DS/PSP when needed (#8587)
Signed-off-by: Mac Chaffee <me@macchaffee.com>
This commit is contained in:
parent
72b2f98edb
commit
6c3a237d7d
2 changed files with 4 additions and 8 deletions
|
@ -82,14 +82,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
args:
|
args:
|
||||||
{{- include "ingress-nginx.params" . | nindent 12 }}
|
{{- include "ingress-nginx.params" . | nindent 12 }}
|
||||||
securityContext:
|
securityContext: {{ include "controller.containerSecurityContext" . | nindent 12 }}
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
add:
|
|
||||||
- NET_BIND_SERVICE
|
|
||||||
runAsUser: {{ .Values.controller.image.runAsUser }}
|
|
||||||
allowPrivilegeEscalation: {{ .Values.controller.image.allowPrivilegeEscalation }}
|
|
||||||
env:
|
env:
|
||||||
- name: POD_NAME
|
- name: POD_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -12,6 +12,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
allowedCapabilities:
|
allowedCapabilities:
|
||||||
- NET_BIND_SERVICE
|
- NET_BIND_SERVICE
|
||||||
|
{{- if .Values.controller.image.chroot }}
|
||||||
|
- SYS_CHROOT
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.controller.sysctls }}
|
{{- if .Values.controller.sysctls }}
|
||||||
allowedUnsafeSysctls:
|
allowedUnsafeSysctls:
|
||||||
{{- range $sysctl, $value := .Values.controller.sysctls }}
|
{{- range $sysctl, $value := .Values.controller.sysctls }}
|
||||||
|
|
Loading…
Reference in a new issue