Skip to content

Conversation

@olandr
Copy link

@olandr olandr commented Aug 13, 2025

Description:
At the moment it is not possible to set the spec.hostPID field for the collector (regardless of type). This change adds a featuregate operator.security.hostpid that allows a user to configure the spec.hostPID field for the collector.

Inspiration for the code follows from the functionality of the hostNetwork boolean field
Link to tracking Issue(s): 4214

Testing:

  • adds e2e tests for all types
  • adds unit tests for configuring the hostPID depending on featureflag activation.

Documentation:
Autogenerated docs from the type defs.


on-behalf-of: @SAP Simon Olander ([email protected])

@olandr olandr requested a review from a team as a code owner August 13, 2025 10:08
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 13, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@olandr olandr force-pushed the feat/allow-hostpid-support-otelcol branch from 4751e3d to a732ae0 Compare August 26, 2025 13:55
olandr added 5 commits October 6, 2025 10:17
This adds the field `hostPID boolean` field to the different modes of the collector PodSpec template.
- adds hostPID to collector,
- adjusts daemonset, deplotment, statefulsets to allow setting hostPID

Inspiration for the code follows from the functionality of the `hostNetwork boolean` field

---------

on-behalf-of: @SAP Simon Olander ([email protected])
- adds unit and e2e tests
- adds .chloggen entry

---------

on-behalf-of: @SAP Simon Olander ([email protected])
---------

on-behalf-of: @SAP Simon Olander ([email protected])
fields in v1beta1/common.go area for all component types. for now the hostPID support is only for the collector

---------

on-behalf-of: @SAP Simon Olander ([email protected])
… after discussion in SIG deeming it redundant

---------

on-behalf-of: @SAP Simon Olander ([email protected])
@olandr olandr force-pushed the feat/allow-hostpid-support-otelcol branch from 6eeced7 to fd6aa08 Compare October 6, 2025 10:06
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

E2E Test Results

 34 files  ±0  223 suites  +2   2h 32m 16s ⏱️ + 33m 53s
 89 tests +1   88 ✅ ±0  0 💤 ±0  1 ❌ +1 
227 runs  +2  225 ✅ ±0  0 💤 ±0  2 ❌ +2 

For more details on these failures, see this check.

Results for commit fd6aa08. ± Comparison against base commit 1387db7.

@olandr
Copy link
Author

olandr commented Oct 10, 2025

I just added a case in the issue to reproduce the error. Which this change resolves.

---------

on-behalf-of: @SAP Simon Olander ([email protected])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for setting the OpenTelemetryCollector hostPID field

4 participants