prometheus-adapter: fix Windows compatibility in ClusterRoleBinding name#2787
Conversation
| kind: 'ClusterRoleBinding', | ||
| metadata: pa._metadata_no_ns { | ||
| name: 'resource-metrics:system:auth-delegator', | ||
| name: 'resource-metrics-system-auth-delegator', |
There was a problem hiding this comment.
hmm I wouldn't rename an existing resource without good reasons. : characters are allowed in Role/ClusterRole.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Maybe docs/troubleshooting.md ?
If not then, i think there's nothing better and i'll close this pr
Fixes: #2750
Description
Rename ClusterRoleBinding from
resource-metrics:system:auth-delegatortoresource-metrics-system-auth-delegatoras colons are invalid filename characters on Windows, causingkubectl diff -kto 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