RUN-1121 | feat: run odiglet and data-collection as non-privileged by default - #5759
Conversation
blumamir
left a comment
There was a problem hiding this comment.
added few nit comments
| # @schema | ||
| # description: |- | ||
| # Run the odiglet container, and its init container, as non-privileged containers. | ||
| # @schema | ||
| unPrivileged: false |
There was a problem hiding this comment.
I guess if it's possible then all people would prefer to use it right, but then we should mention when it would not work and under which conditions it needs to be set?
| {{- end }} | ||
| securityContext: | ||
| {{- if not .Values.odiglet.unPrivileged}} | ||
| {{- if not .Values.odiglet.odiglet.unPrivileged}} |
There was a problem hiding this comment.
will it work for oss? should we check and fail the deployment if it's used where not supported?
| # @schema | ||
| # description: |- | ||
| # seLinuxOptions for the data-collection container when running as unPrivileged. | ||
| # "spc_t" is the SELinux domain the container already gets when running privileged. | ||
| # @schema | ||
| seLinuxOptions: | ||
| type: "spc_t" |
There was a problem hiding this comment.
When someone will need to use it, how can he know what to write here in order to make it work?
Should we mention when to use it and how?
| # uncomment when profiling.enabled is true - the eBPF profiler reads | ||
| # /proc/kallsyms addresses and raises RLIMIT_MEMLOCK | ||
| # - SYSLOG | ||
| # - SYS_RESOURCE |
There was a problem hiding this comment.
we can write this into the template, right? it will be easy to miss. if we choose to keep it, should we also add a comment next to profiling.enabled to make it more discoverable?
9cb77ce to
aaf4ebb
Compare
aaf4ebb to
353b434
Compare
22f7337 to
05c6a49
Compare
05c6a49 to
a47ec71
Compare
What this PR does / why we need it:
The odiglet daemonset ran its containers as privileged by default, and there was no explicit flag controlling the data-collection container at all — its privilege level was implied by the collected signals. Running it non-privileged required
--set signals="{traces}", which coupled an unrelated setting to a security decision and made logs/metrics collectionimpossible without privileged mode.
This PR:
odiglet.unPrivilegedwith per-containerodiglet.odiglet.privilegedandodiglet.dataCollection.privileged, both defaulting tofalse. The old key sat at the pod level but only ever controlled the odiglet and init containers, which was misleading.odiglet.dataCollection.seLinuxOptions(defaultspc_t), the SELinux domain the container already receives when running privileged, so dropping privileged does not change its domain on SELinux-enforcing nodes.SYSLOGandSYS_RESOURCEto data-collection whenprofiling.enabledis true, only when not already present in the user-supplied capabilities list. The eBPF profiler reads/proc/kallsymsaddresses (CAP_SYSLOG) and raisesRLIMIT_MEMLOCK(CAP_SYS_RESOURCE).NET_ADMINandNET_RAWare added to the default capability set of the odiglet container - these can be removed if OBI is not used.KILLcapability since the upstream go openteleemtry instrumentation use signal(0) to check for existance of a PID.Changelog entry: Does this PR introduce a user-facing bug fix, feature, dependency update, or breaking change??