Skip to content

Commit d0cdb6b

Browse files
committed
deploy: add container security context
- deny privilege escalation - set readonly root fs - add tmp emptyDir volume
1 parent 4b46556 commit d0cdb6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

config/manager/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ spec:
2323
- name: manager
2424
image: fluxcd/source-controller
2525
imagePullPolicy: IfNotPresent
26+
securityContext:
27+
allowPrivilegeEscalation: false
28+
readOnlyRootFilesystem: true
2629
ports:
2730
- containerPort: 8080
2831
name: http
@@ -46,6 +49,10 @@ spec:
4649
volumeMounts:
4750
- name: data
4851
mountPath: /data
52+
- name: tmp
53+
mountPath: /tmp
4954
volumes:
5055
- name: data
5156
emptyDir: {}
57+
- name: tmp
58+
emptyDir: {}

0 commit comments

Comments
 (0)