Skip to content

Fix port allocation for node-exporter#2627

Merged
philipgough merged 2 commits intoprometheus-operator:mainfrom
steve-wolter-ai:main
May 16, 2025
Merged

Fix port allocation for node-exporter#2627
philipgough merged 2 commits intoprometheus-operator:mainfrom
steve-wolter-ai:main

Conversation

@steve-wolter-ai
Copy link
Copy Markdown
Contributor

Description

The daemonset for the node exporter is statically invalid. It assigns port 9100 both to the node-exporter container and to the kube-rbac-proxy container.

This results in the following behavior at runtime:

  1. kube-rbac-proxy and node-exporter race for port 9100.
  2. If kube-rbac-proxy wins, the system functions normally. However, kube-rbac-proxy is disfunctional and does NOT actually check authorization.
  3. If kube-rbac-proxy wins, it fails to locate its upstream and crashes. The race restarts.

This change is somewhat risky as we've been (so far) rolling out node-exporter with no kube-rbac-proxy, and would now unmasks any bugs in the kube-rbac-proxy integration.

Type of change

What type of changes does your code introduce to the kube-prometheus? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Activate kube-rbac-proxy for node-exporter.


@steve-wolter-ai steve-wolter-ai requested a review from a team as a code owner March 17, 2025 09:23
@cypres
Copy link
Copy Markdown

cypres commented Apr 4, 2025

You meant

If node-exporter wins, the system functions normally. However, kube-rbac-proxy is disfunctional and does NOT actually check authorization.

Right

I can confirm this fixes the issue, thank you very much!

Copy link
Copy Markdown
Contributor

@philipgough philipgough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm thanks

@philipgough philipgough merged commit d5604b5 into prometheus-operator:main May 16, 2025
10 of 11 checks passed
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.

3 participants