Skip to content

Commit e96db73

Browse files
martin-matclaude
andauthored
fix(helm): run eUPF as a non-root user by default (#674)
Signed-off-by: Martin Matyas <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
1 parent 4d53c90 commit e96db73

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎.deploy/helm/eupf/values.yaml‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,18 @@ configMaps: {}
100100
# foo: bar
101101

102102
# volumes.
103-
# The /sys hostPath volume is required: as root, the container entrypoint
104-
# mounts bpffs and debugfs under /sys to load the eBPF data plane; as a
105-
# non-root user (see securityContext) eUPF uses the node's bpffs through it.
103+
# The node's BPF filesystem, where eUPF pins its maps. Only bpffs is needed
104+
# as a non-root user; a root container that mounts bpffs and debugfs itself
105+
# (the entrypoint does, when root) needs /sys instead.
106106
volumes:
107107
- name: sys
108108
hostPath:
109-
path: /sys
109+
path: /sys/fs/bpf
110110

111111
# volume mounts
112112
volumeMounts:
113113
- name: sys
114-
mountPath: /sys
115-
readOnly: true
114+
mountPath: /sys/fs/bpf
116115

117116
hostNetwork: false
118117

@@ -251,8 +250,11 @@ podSecurityContext:
251250
# capabilities:
252251
# add: [NET_ADMIN, SYS_RESOURCE, BPF, PERFMON, DAC_OVERRIDE]
253252
securityContext:
253+
runAsUser: 1000
254+
runAsGroup: 1000
255+
runAsNonRoot: true
254256
capabilities:
255-
add: [NET_ADMIN, SYS_ADMIN, SYS_RESOURCE, BPF, PERFMON]
257+
add: [NET_ADMIN, SYS_RESOURCE, BPF, PERFMON, DAC_OVERRIDE]
256258

257259
extraContainerPorts:
258260
- name: metrics

0 commit comments

Comments
 (0)