Skip to content

Commit 06e3c2f

Browse files
authored
Merge pull request #4869 from camilamacedo86/psa
🐛 (go/v4): ensure manager and curl pod use readOnlyRootFilesystem to comply with PSA rules
2 parents 012e741 + bcdda7c commit 06e3c2f

File tree

21 files changed

+21
-0
lines changed

21 files changed

+21
-0
lines changed

docs/book/src/cronjob-tutorial/testdata/project/config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
name: manager
6868
ports: []
6969
securityContext:
70+
readOnlyRootFilesystem: true
7071
allowPrivilegeEscalation: false
7172
capabilities:
7273
drop:

docs/book/src/cronjob-tutorial/testdata/project/dist/install.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4197,6 +4197,7 @@ spec:
41974197
capabilities:
41984198
drop:
41994199
- ALL
4200+
readOnlyRootFilesystem: true
42004201
volumeMounts:
42014202
- mountPath: /tmp/k8s-metrics-server/metrics-certs
42024203
name: metrics-certs

docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ var _ = Describe("Manager", Ordered, func() {
226226
"command": ["/bin/sh", "-c"],
227227
"args": ["curl -v -k -H 'Authorization: Bearer %s' https://%s.%s.svc.cluster.local:8443/metrics"],
228228
"securityContext": {
229+
"readOnlyRootFilesystem": true,
229230
"allowPrivilegeEscalation": false,
230231
"capabilities": {
231232
"drop": ["ALL"]

docs/book/src/getting-started/testdata/project/config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
name: manager
6868
ports: []
6969
securityContext:
70+
readOnlyRootFilesystem: true
7071
allowPrivilegeEscalation: false
7172
capabilities:
7273
drop:

docs/book/src/getting-started/testdata/project/dist/install.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ spec:
453453
capabilities:
454454
drop:
455455
- ALL
456+
readOnlyRootFilesystem: true
456457
volumeMounts: []
457458
securityContext:
458459
runAsNonRoot: true

docs/book/src/getting-started/testdata/project/test/e2e/e2e_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ var _ = Describe("Manager", Ordered, func() {
221221
"command": ["/bin/sh", "-c"],
222222
"args": ["curl -v -k -H 'Authorization: Bearer %s' https://%s.%s.svc.cluster.local:8443/metrics"],
223223
"securityContext": {
224+
"readOnlyRootFilesystem": true,
224225
"allowPrivilegeEscalation": false,
225226
"capabilities": {
226227
"drop": ["ALL"]

docs/book/src/multiversion-tutorial/testdata/project/config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
name: manager
6868
ports: []
6969
securityContext:
70+
readOnlyRootFilesystem: true
7071
allowPrivilegeEscalation: false
7172
capabilities:
7273
drop:

docs/book/src/multiversion-tutorial/testdata/project/dist/install.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8049,6 +8049,7 @@ spec:
80498049
capabilities:
80508050
drop:
80518051
- ALL
8052+
readOnlyRootFilesystem: true
80528053
volumeMounts:
80538054
- mountPath: /tmp/k8s-metrics-server/metrics-certs
80548055
name: metrics-certs

docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ var _ = Describe("Manager", Ordered, func() {
226226
"command": ["/bin/sh", "-c"],
227227
"args": ["curl -v -k -H 'Authorization: Bearer %s' https://%s.%s.svc.cluster.local:8443/metrics"],
228228
"securityContext": {
229+
"readOnlyRootFilesystem": true,
229230
"allowPrivilegeEscalation": false,
230231
"capabilities": {
231232
"drop": ["ALL"]

pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/manager/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ spec:
113113
name: manager
114114
ports: []
115115
securityContext:
116+
readOnlyRootFilesystem: true
116117
allowPrivilegeEscalation: false
117118
capabilities:
118119
drop:

0 commit comments

Comments
 (0)