Skip to content

Commit 91f51dc

Browse files
Merge pull request #809 from TheRealJon/CONSOLE-3791
CONSOLE-3791: Add "readOnlyRootFilesystem" to all console conta…
2 parents ed8a450 + f573cce commit 91f51dc

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

bindata/assets/deployments/console-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ spec:
5555
- "25"
5656
name: console
5757
securityContext:
58+
readOnlyRootFilesystem: false
5859
allowPrivilegeEscalation: false
5960
capabilities:
6061
drop:

bindata/assets/deployments/downloads-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ spec:
4646
failureThreshold: 3
4747
name: download-server
4848
securityContext:
49+
readOnlyRootFilesystem: false
4950
allowPrivilegeEscalation: false
5051
capabilities:
5152
drop:

manifests/07-operator-ibm-cloud-managed.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ spec:
6464
capabilities:
6565
drop:
6666
- ALL
67+
readOnlyRootFilesystem: true
6768
terminationMessagePolicy: FallbackToLogsOnError
6869
volumeMounts:
6970
- mountPath: /var/run/configmaps/config
@@ -102,6 +103,7 @@ spec:
102103
capabilities:
103104
drop:
104105
- ALL
106+
readOnlyRootFilesystem: true
105107
terminationMessagePolicy: FallbackToLogsOnError
106108
volumeMounts:
107109
- mountPath: /var/run/configmaps/config

manifests/07-operator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ spec:
4343
containers:
4444
- name: console-operator
4545
securityContext:
46+
readOnlyRootFilesystem: true
4647
allowPrivilegeEscalation: false
4748
capabilities:
4849
drop: ["ALL"]
@@ -92,6 +93,7 @@ spec:
9293
scheme: HTTPS
9394
- name: conversion-webhook-server
9495
securityContext:
96+
readOnlyRootFilesystem: true
9597
allowPrivilegeEscalation: false
9698
capabilities:
9799
drop: ["ALL"]

pkg/console/subresource/deployment/deployment_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,7 @@ func TestDefaultDownloadsDeployment(t *testing.T) {
14151415
},
14161416
Args: downloadsDeploymentTemplate.Spec.Template.Spec.Containers[0].Args,
14171417
SecurityContext: &corev1.SecurityContext{
1418+
ReadOnlyRootFilesystem: utilpointer.Bool(false),
14181419
Capabilities: &corev1.Capabilities{
14191420
Drop: []corev1.Capability{
14201421
"ALL",

0 commit comments

Comments
 (0)