Skip to content

Commit da2a674

Browse files
committed
Drop unrequired capabilities from containers
1 parent f4b00ef commit da2a674

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

deploy/manifests/nginx-gateway.yaml

+14-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ spec:
110110
mountPath: /etc/nginx
111111
securityContext:
112112
runAsUser: 1001
113-
# FIXME(pleshakov) - figure out which capabilities are required
114-
# dropping ALL and adding only CAP_KILL doesn't work
115-
# Note: CAP_KILL is needed for sending HUP signal to NGINX main process
113+
capabilities:
114+
drop:
115+
- ALL
116+
add:
117+
- KILL
116118
env:
117119
- name: POD_IP
118120
valueFrom:
@@ -137,3 +139,12 @@ spec:
137139
mountPath: /var/lib/nginx
138140
- name: njs-modules
139141
mountPath: /usr/lib/nginx/modules/njs
142+
securityContext:
143+
capabilities:
144+
drop:
145+
- ALL
146+
add:
147+
- CHOWN
148+
- NET_BIND_SERVICE
149+
- SETGID
150+
- SETUID

0 commit comments

Comments
 (0)