Skip to content

Commit d58be4b

Browse files
Merge pull request #2008 from stuggi/operator_ro_root
Set readOnlyRootFilesystem on service operator controller-manager containers
2 parents 4665566 + 010517c commit d58be4b

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎bindata/operator/managers.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ spec:
6767
memory: {{ .Deployment.Manager.Resources.Requests.Memory }}
6868
securityContext:
6969
allowPrivilegeEscalation: false
70+
capabilities:
71+
drop:
72+
- "ALL"
73+
readOnlyRootFilesystem: true
7074
volumeMounts:
75+
- mountPath: /tmp
76+
name: tmp
7177
{{- if isEnvVarTrue .Deployment.Manager.Env "ENABLE_WEBHOOKS" }}
7278
- mountPath: /tmp/k8s-webhook-server/serving-certs
7379
name: cert
@@ -99,6 +105,8 @@ spec:
99105
{{- end }}
100106
{{- end }}
101107
volumes:
108+
- emptyDir: {}
109+
name: tmp
102110
{{- if isEnvVarTrue .Deployment.Manager.Env "ENABLE_WEBHOOKS" }}
103111
- name: cert
104112
secret:

‎config/operator/managers.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ spec:
6767
memory: {{ .Deployment.Manager.Resources.Requests.Memory }}
6868
securityContext:
6969
allowPrivilegeEscalation: false
70+
capabilities:
71+
drop:
72+
- "ALL"
73+
readOnlyRootFilesystem: true
7074
volumeMounts:
75+
- mountPath: /tmp
76+
name: tmp
7177
{{- if isEnvVarTrue .Deployment.Manager.Env "ENABLE_WEBHOOKS" }}
7278
- mountPath: /tmp/k8s-webhook-server/serving-certs
7379
name: cert
@@ -99,6 +105,8 @@ spec:
99105
{{- end }}
100106
{{- end }}
101107
volumes:
108+
- emptyDir: {}
109+
name: tmp
102110
{{- if isEnvVarTrue .Deployment.Manager.Env "ENABLE_WEBHOOKS" }}
103111
- name: cert
104112
secret:

0 commit comments

Comments
 (0)