Skip to content

Commit

Permalink
Add CAP_SYS_CHROOT to DS/PSP when needed (#8587)
Browse files Browse the repository at this point in the history
Signed-off-by: Mac Chaffee <[email protected]>
  • Loading branch information
mac-chaffee authored May 16, 2022
1 parent 72b2f98 commit 6c3a237
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 1 addition & 8 deletions charts/ingress-nginx/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,7 @@ spec:
{{- end }}
args:
{{- include "ingress-nginx.params" . | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
runAsUser: {{ .Values.controller.image.runAsUser }}
allowPrivilegeEscalation: {{ .Values.controller.image.allowPrivilegeEscalation }}
securityContext: {{ include "controller.containerSecurityContext" . | nindent 12 }}
env:
- name: POD_NAME
valueFrom:
Expand Down
3 changes: 3 additions & 0 deletions charts/ingress-nginx/templates/controller-psp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
spec:
allowedCapabilities:
- NET_BIND_SERVICE
{{- if .Values.controller.image.chroot }}
- SYS_CHROOT
{{- end }}
{{- if .Values.controller.sysctls }}
allowedUnsafeSysctls:
{{- range $sysctl, $value := .Values.controller.sysctls }}
Expand Down

0 comments on commit 6c3a237

Please sign in to comment.