Skip to content

Commit 30961cc

Browse files
committed
Add security context to forwarder-vpp and nsmgr example manifests (#6826)
Related PRs: cmd-nsmgr/#547 cmd-forwarder-vpp/#681 Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
1 parent f427400 commit 30961cc

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

apps/forwarder-vpp/forwarder.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ spec:
2424
name: forwarder-vpp
2525
securityContext:
2626
privileged: true
27+
runAsNonRoot: true
28+
runAsUser: 10001
29+
runAsGroup: 10001
30+
capabilities:
31+
drop:
32+
- ALL
33+
add: ["DAC_OVERRIDE", "SYS_ADMIN", "NET_ADMIN", "IPC_LOCK", "NET_RAW", "SYS_PTRACE", "SETGID"]
2734
env:
2835
- name: SPIFFE_ENDPOINT_SOCKET
2936
value: unix:///run/spire/sockets/agent.sock

apps/nsmgr/nsmgr.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ spec:
1616
"spiffe.io/spiffe-id": "true"
1717
spec:
1818
serviceAccount: nsmgr-sa
19+
securityContext:
20+
runAsNonRoot: true
21+
runAsUser: 10001
22+
runAsGroup: 10001
1923
containers:
2024
- image: ghcr.io/networkservicemesh/ci/cmd-nsmgr:5b232e8
2125
imagePullPolicy: IfNotPresent
@@ -81,6 +85,11 @@ spec:
8185
command: ["/bin/grpc-health-probe", "-spiffe", "-addr=:5001"]
8286
failureThreshold: 25
8387
periodSeconds: 5
88+
securityContext:
89+
capabilities:
90+
drop:
91+
- ALL
92+
add: ["DAC_OVERRIDE"]
8493
- image: ghcr.io/networkservicemesh/ci/cmd-exclude-prefixes-k8s:454b980
8594
imagePullPolicy: IfNotPresent
8695
name: exclude-prefixes
@@ -94,6 +103,10 @@ spec:
94103
limits:
95104
memory: 40Mi
96105
cpu: 75m
106+
securityContext:
107+
capabilities:
108+
drop:
109+
- ALL
97110
volumes:
98111
- name: spire-agent-socket
99112
hostPath:

0 commit comments

Comments
 (0)