Skip to content

prometheus-adapter: fix Windows compatibility in ClusterRoleBinding name#2787

Open
varundeepsaini wants to merge 1 commit intoprometheus-operator:mainfrom
varundeepsaini:fix/windows-compatible-clusterrolebinding-name
Open

prometheus-adapter: fix Windows compatibility in ClusterRoleBinding name#2787
varundeepsaini wants to merge 1 commit intoprometheus-operator:mainfrom
varundeepsaini:fix/windows-compatible-clusterrolebinding-name

Conversation

@varundeepsaini
Copy link
Copy Markdown
Contributor

@varundeepsaini varundeepsaini commented Dec 21, 2025

Fixes: #2750

Description

Rename ClusterRoleBinding from resource-metrics:system:auth-delegator to resource-metrics-system-auth-delegator as colons are invalid filename characters on Windows, causing kubectl diff -k to fail.

Type of change

  • 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

Fix Windows compatibility by renaming prometheus-adapter ClusterRoleBinding to use hyphens instead of colons.

@varundeepsaini varundeepsaini requested a review from a team as a code owner December 21, 2025 16:19
kind: 'ClusterRoleBinding',
metadata: pa._metadata_no_ns {
name: 'resource-metrics:system:auth-delegator',
name: 'resource-metrics-system-auth-delegator',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm I wouldn't rename an existing resource without good reasons. : characters are allowed in Role/ClusterRole.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point. This is actually a kubectl diff limitation on Windows - it uses resource names in temp file paths, and colons aren't valid in Windows filenames. Should I report this as a kubectl bug, or would you prefer to document it as a known Windows limitation?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not a Windows user so I can't really investigate the issue. If you think that's a kubectl issue with Windows, feel free to file a bug upstream.
Documenting the limitation would be good, not sure what's the most appropriate place though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe docs/troubleshooting.md ?

If not then, i think there's nothing better and i'll close this pr

@github-actions github-actions Bot added the stale label Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClusterRoleBinding name causes errors on Windows

2 participants