Skip to content

Commit 4411341

Browse files
committed
Read only filesystem
1 parent 6a86b39 commit 4411341

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

conformance/provisioner/static-deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ spec:
7171
- NET_BIND_SERVICE
7272
drop:
7373
- ALL
74+
readOnlyRootFilesystem: true
7475
runAsUser: 101
7576
runAsGroup: 1001
7677
volumeMounts:
@@ -80,6 +81,10 @@ spec:
8081
mountPath: /etc/nginx/secrets
8182
- name: nginx-run
8283
mountPath: /var/run/nginx
84+
- name: nginx-cache
85+
mountPath: /var/cache/nginx
86+
- name: nginx-lib
87+
mountPath: /var/lib/nginx
8388
serviceAccountName: nginx-gateway
8489
shareProcessNamespace: true
8590
securityContext:
@@ -92,3 +97,7 @@ spec:
9297
emptyDir: {}
9398
- name: nginx-run
9499
emptyDir: {}
100+
- name: nginx-cache
101+
emptyDir: {}
102+
- name: nginx-lib
103+
emptyDir: {}

conformance/tests/conformance-rbac.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ rules:
2727
- deployments
2828
verbs:
2929
- create
30-
- update
3130
- delete
3231
- get
3332
- list

deploy/helm-chart/templates/deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ spec:
6666
- NET_BIND_SERVICE
6767
drop:
6868
- ALL
69+
readOnlyRootFilesystem: true
6970
runAsUser: 101
7071
runAsGroup: 1001
7172
volumeMounts:
@@ -75,6 +76,10 @@ spec:
7576
mountPath: /etc/nginx/secrets
7677
- name: nginx-run
7778
mountPath: /var/run/nginx
79+
- name: nginx-cache
80+
mountPath: /var/cache/nginx
81+
- name: nginx-lib
82+
mountPath: /var/lib/nginx
7883
serviceAccountName: {{ include "nginx-gateway.serviceAccountName" . }}
7984
shareProcessNamespace: true
8085
securityContext:
@@ -87,4 +92,8 @@ spec:
8792
emptyDir: {}
8893
- name: nginx-run
8994
emptyDir: {}
95+
- name: nginx-cache
96+
emptyDir: {}
97+
- name: nginx-lib
98+
emptyDir: {}
9099
{{- end }}

deploy/manifests/nginx-gateway.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ spec:
172172
- NET_BIND_SERVICE
173173
drop:
174174
- ALL
175+
readOnlyRootFilesystem: true
175176
runAsUser: 101
176177
runAsGroup: 1001
177178
volumeMounts:
@@ -181,6 +182,10 @@ spec:
181182
mountPath: /etc/nginx/secrets
182183
- name: nginx-run
183184
mountPath: /var/run/nginx
185+
- name: nginx-cache
186+
mountPath: /var/cache/nginx
187+
- name: nginx-lib
188+
mountPath: /var/lib/nginx
184189
serviceAccountName: nginx-gateway
185190
shareProcessNamespace: true
186191
securityContext:
@@ -193,6 +198,10 @@ spec:
193198
emptyDir: {}
194199
- name: nginx-run
195200
emptyDir: {}
201+
- name: nginx-cache
202+
emptyDir: {}
203+
- name: nginx-lib
204+
emptyDir: {}
196205
---
197206
# Source: nginx-kubernetes-gateway/templates/gatewayclass.yaml
198207
apiVersion: gateway.networking.k8s.io/v1beta1

0 commit comments

Comments
 (0)