Skip to content

Commit 86a2d6d

Browse files
committed
add readOnlyFileSystem
1 parent a68ffe8 commit 86a2d6d

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

assets/csi_controller_deployment.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ spec:
2626
spec:
2727
securityContext:
2828
runAsNonRoot: true
29+
readOnlyRootFilesystem: true
2930
seccompProfile:
3031
type: RuntimeDefault
3132
serviceAccount: csi-snapshot-controller

manifests/07_deployment-hypershift.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ spec:
5353
volumeMounts:
5454
- mountPath: /etc/guest-kubeconfig
5555
name: guest-kubeconfig
56+
- mountPath: /var/run/secrets/serving-cert
57+
name: serving-cert
5658
securityContext:
5759
runAsNonRoot: true
5860
seccompProfile:
@@ -62,3 +64,7 @@ spec:
6264
- name: guest-kubeconfig
6365
secret:
6466
secretName: service-network-admin-kubeconfig
67+
- name: serving-cert
68+
secret:
69+
secretName: serving-cert
70+
optional: true

manifests/07_deployment.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ spec:
3131
requests:
3232
memory: 65Mi
3333
cpu: 10m
34+
volumeMounts:
35+
- mountPath: /var/run/secrets/serving-cert
36+
name: serving-cert
3437
securityContext:
3538
allowPrivilegeEscalation: false
36-
readOnlyRootFilesystem: false
39+
readOnlyRootFilesystem: true
3740
capabilities:
3841
drop:
3942
- ALL
@@ -54,6 +57,11 @@ spec:
5457
fieldRef:
5558
fieldPath: metadata.name
5659
terminationMessagePolicy: FallbackToLogsOnError
60+
volumes:
61+
- name: serving-cert
62+
secret:
63+
secretName: serving-cert
64+
optional: true
5765
priorityClassName: "system-cluster-critical"
5866
nodeSelector:
5967
node-role.kubernetes.io/master: ""
@@ -73,3 +81,4 @@ spec:
7381
runAsNonRoot: true
7482
seccompProfile:
7583
type: RuntimeDefault
84+

0 commit comments

Comments
 (0)