Commit 60007ef
* Add host volume mounts to Private Action Runner container
Mount /var/log, /etc/os-release, and /proc from the host into the PAR
container under /host as read-only volumes. This enables the PAR to
inspect host-level logs, OS information, and process data.
* Add PAR host volumes only when PAR container is required
Move host-varlog and host-osrelease volumes from the base volumesForAgent
list into a conditional block gated on PrivateActionRunnerContainerName,
mirroring the existing SystemProbe pattern. This prevents unused HostPath
volumes from being added to every Agent pod, which can cause admission
failures in environments enforcing HostPath allowlists.
* style: format files
* Add NET_RAW capability to PAR container
The Private Action Runner container needs the NET_RAW capability to
perform network operations on the host.
* Move PAR host volumes, mounts, and NET_RAW to feature code
Volumes, mounts, and capabilities should be managed by the feature
system, not hardcoded in component defaults. This moves host volume
mounts (/proc, /etc/os-release, /var/log) and the NET_RAW capability
from default.go into the PAR feature's ManageNodeAgent(), following
the same pattern used by logcollection, npm, and other features.
* Add generic HostOSRelease aliases for os-release volume constants
The SystemProbeOSReleaseDirVolumeName constants are semantically tied to
system-probe despite being general-purpose. Add generic aliases
(HostOSReleaseVolumeName, HostOSReleaseHostPath, HostOSReleaseMountPath)
and use them in PAR feature code and volume helpers so that
privateactionrunner does not reference system-probe constants.
* Use standalone values for HostOSRelease constants
Define HostOSRelease constants with their own literal values instead of
aliasing the SystemProbe variants.
* Move host volume constants to PAR package, remove unused common helpers
Host volume constants (varlog, os-release, proc) are only used by the
PAR feature, so they belong in the PAR package as unexported constants.
Remove the now-unused GetVolumeForHostVarLog, GetVolumeMountForHostVarLog,
GetVolumeForOSRelease, GetVolumeMountForOSRelease helpers and their
corresponding exported constants from common.
* revert const.go
* Reuse existing common constants for procdir and os-release volumes
The procdir and os-release volume constants already exist in
common/const.go. Remove the duplicates from PAR's const.go and
reference the common ones directly.
* Add host volumes individually instead of loop
Replace loop-based volume addition with individual volume.GetVolumes()
calls per volume, matching the pattern used by npm and other features
for better readability.
---------
(cherry picked from commit 8c060c4)
Co-authored-by: Matthew DeGuzman <91019033+matt-dz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Timothée Bavelier <97530782+tbavelier@users.noreply.github.com>
Co-authored-by: levan-m <116471169+levan-m@users.noreply.github.com>
1 parent c7eb86e commit 60007ef
3 files changed
Lines changed: 61 additions & 8 deletions
File tree
- internal/controller/datadogagent/feature/privateactionrunner
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
296 | 318 | | |
297 | 319 | | |
298 | 320 | | |
| |||
Lines changed: 35 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
116 | | - | |
| 124 | + | |
117 | 125 | | |
118 | | - | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
124 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
125 | 152 | | |
126 | 153 | | |
127 | 154 | | |
| |||
0 commit comments