Skip to content

Commit 785feeb

Browse files
Ansible-manCade ThomasschristoffAustinAbro321dependabot[bot]
authored
feat: make zarf-agent pods comply with offical restricted pod security standard (#3036)
Signed-off-by: Cade Thomas <[email protected]> Signed-off-by: schristoff <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Cade Thomas <[email protected]> Co-authored-by: schristoff <[email protected]> Co-authored-by: Austin Abro <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 38f5f99 commit 785feeb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/zarf-agent/manifests/deployment.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ spec:
2121
- name: private-registry
2222
priorityClassName: system-node-critical
2323
serviceAccountName: zarf
24+
# Security context to comply with restricted PSS
25+
securityContext:
26+
runAsUser: 1000
27+
fsGroup: 2000
28+
runAsGroup: 2000
29+
seccompProfile:
30+
type: "RuntimeDefault"
2431
containers:
2532
- name: server
2633
image: "###ZARF_REGISTRY###/###ZARF_CONST_AGENT_IMAGE###:###ZARF_CONST_AGENT_IMAGE_TAG###"
@@ -32,6 +39,12 @@ spec:
3239
scheme: HTTPS
3340
ports:
3441
- containerPort: 8443
42+
securityContext:
43+
readOnlyRootFilesystem: true
44+
allowPrivilegeEscalation: false
45+
runAsNonRoot: true
46+
capabilities:
47+
drop: ["ALL"]
3548
resources:
3649
requests:
3750
memory: "32Mi"

0 commit comments

Comments
 (0)