Skip to content

Comments

[prometheus-node-exporter] Add rapl initContainer#6589

Closed
henrichter wants to merge 27 commits intoprometheus-community:mainfrom
henrichter:main
Closed

[prometheus-node-exporter] Add rapl initContainer#6589
henrichter wants to merge 27 commits intoprometheus-community:mainfrom
henrichter:main

Conversation

@henrichter
Copy link

What this PR does / why we need it

This is a WIP proposal to see if there's interest in baking a permission fix for the powercap collector into the chart.

Currently, node-exporter can't scrape RAPL metrics on most distros because /sys/devices/virtual/powercap/*/energy_uj is root:root 0400. This PR adds an initContainer to chown these files to the exporter's GID and chmod 640 them so the collector actually works without running the whole daemon as root.

Which issue this PR fixes

Special notes for your reviewer

  • Waiting for feedback before bumping Chart version
  • If interested I'm happy to wrap this in an enabled flag so it's strictly opt-in.
  • I targeted the nobody group as the owner. Open to better ideas if you want to tighten this further.
  • Logic based on scaphandre's init script

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Signed-off-by: henrichter <hr.richterhenry@gmail.com>
@henrichter
Copy link
Author

I've seen something similar being used by bitnami postgresql chart [1]. They use a volumePermissions.enabled flag. Maybe we can do somthing similar, such that other Permissionfixes can be added/toggled later?

[1] https://github.com/bitnami/charts/blob/8caeb0c818e72f9b7f03e1b01a24ce1ea1886e6f/bitnami/postgresql/values.yaml#L1591-L1594

firasmosbehi and others added 24 commits February 20, 2026 00:23
Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
…track-stats-exporter to v0.4.40 (prometheus-community#6590)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…/postgres_exporter to v0.19.0 (prometheus-community#6591)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ommunity#6578)

Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com>
…metheus-community#6592)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…exporter to v0.19.1 (prometheus-community#6582)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…operator/prometheus-operator to v0.89.0 (prometheus-community#6593)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…etheus-operator to v0.89.0 (prometheus-community#6594)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: helm-charts-renovate-helper[bot] <203471071+helm-charts-renovate-helper[bot]@users.noreply.github.com>
…metheus-config-reloader Docker tag to v0.89.0 (prometheus-community#6596)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…eloader Docker tag to v0.89.0 (prometheus-community#6595)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…eus-config-reloader Docker tag to v0.89.0 (prometheus-community#6597)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…us-community#6598)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…mmunity#6599)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…track-stats-exporter to v0.4.41 (prometheus-community#6625)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…bouncer-exporter Docker tag to v0.11.1 (prometheus-community#6626)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ader metrics port (prometheus-community#6623)

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ajor updates (prometheus-community#6628)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…webhook-certgen Docker tag to v1.7.6 (prometheus-community#6631)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ajor updates (prometheus-community#6630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ter to v0.48.0 (prometheus-community#6636)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ajor updates (prometheus-community#6637)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rometheus-community#6638)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

4 participants