Skip to content

Commit 65c89c5

Browse files
committed
Add security context for controllers.
1 parent 24c1c7c commit 65c89c5

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

config/default/base/manager_webhook_patch.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ spec:
1616
- mountPath: /tmp/k8s-webhook-server/serving-certs
1717
name: cert
1818
readOnly: true
19+
securityContext:
20+
allowPrivilegeEscalation: false
21+
capabilities:
22+
drop:
23+
- All
24+
runAsNonRoot: true
25+
seccompProfile:
26+
type: RuntimeDefault
1927
volumes:
2028
- name: cert
2129
secret:

config/default/manager_webhook_patch.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ spec:
1616
- mountPath: /tmp/k8s-webhook-server/serving-certs
1717
name: cert
1818
readOnly: true
19+
securityContext:
20+
allowPrivilegeEscalation: false
21+
capabilities:
22+
drop:
23+
- All
24+
runAsNonRoot: true
25+
seccompProfile:
26+
type: RuntimeDefault
1927
volumes:
2028
- name: cert
2129
secret:

config/manager/manager.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,12 @@ spec:
3838
valueFrom:
3939
fieldRef:
4040
fieldPath: metadata.namespace
41+
securityContext:
42+
allowPrivilegeEscalation: false
43+
capabilities:
44+
drop:
45+
- All
46+
runAsNonRoot: true
47+
seccompProfile:
48+
type: RuntimeDefault
4149
terminationGracePeriodSeconds: 10

0 commit comments

Comments
 (0)