Skip to content

Commit a0b3e08

Browse files
authored
fix: harden operator manager pod with readOnlyRootFilesystem and resource limits (#181)
Add readOnlyRootFilesystem: true to the manager container SecurityContext to meet restricted Pod Security Standards and prevent filesystem tampering. Set resource requests/limits (CPU 10m/500m, Memory 64Mi/256Mi) to prevent unbounded resource consumption. Signed-off-by: Sachin Sampras M <sampras343@gmail.com>
1 parent 1aa5933 commit a0b3e08

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎config/manager/manager.yaml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ spec:
7373
ports: []
7474
securityContext:
7575
allowPrivilegeEscalation: false
76+
readOnlyRootFilesystem: true
7677
capabilities:
7778
drop:
7879
- "ALL"
@@ -90,7 +91,13 @@ spec:
9091
periodSeconds: 10
9192
# TODO(user): Configure the resources accordingly based on the project requirements.
9293
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
93-
resources: {}
94+
resources:
95+
requests:
96+
cpu: 10m
97+
memory: 64Mi
98+
limits:
99+
cpu: 500m
100+
memory: 256Mi
94101
volumeMounts: []
95102
volumes: []
96103
serviceAccountName: controller-manager

0 commit comments

Comments
 (0)