Skip to content

helm: scope metrics-reader ClusterRole name to release#47

Merged
tkatila merged 1 commit into
intel:mainfrom
abyrne55:fix/helm-metrics-reader-name-collision
Jun 25, 2026
Merged

helm: scope metrics-reader ClusterRole name to release#47
tkatila merged 1 commit into
intel:mainfrom
abyrne55:fix/helm-metrics-reader-name-collision

Conversation

@abyrne55

Copy link
Copy Markdown
Contributor

Summary

  • Prefix the metrics-reader ClusterRole name with {{ .Release.Name }} to avoid collisions with identically-named resources from other operators

Problem

The metrics-reader ClusterRole uses a generic hardcoded name. On OpenShift clusters where other operators (e.g. LVMS) create a ClusterRole with the same name, helm install fails with:

Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "metrics-reader"
in namespace "" exists and cannot be imported into the current release

Test plan

  • helm install on a cluster with a pre-existing metrics-reader ClusterRole
  • helm template output shows <release-name>-metrics-reader

🤖 Generated with Claude Code

The metrics-reader ClusterRole uses a generic hardcoded name that
collides with identically-named resources from other operators
(e.g. LVMS on OpenShift). Prefix the name with the Helm release
name to avoid the conflict.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Anthony Byrne <abyrne@redhat.com>
@abyrne55 abyrne55 force-pushed the fix/helm-metrics-reader-name-collision branch from 9d0e433 to 2430f7c Compare June 24, 2026 14:58
@abyrne55 abyrne55 marked this pull request as ready for review June 24, 2026 14:59
@tkatila

tkatila commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Thanks @abyrne55! I think this is not the only one. Similar name collision seems to happen with other ClusterRoles also (metrics-auth-role, metrics-auth-rolebinding and manager-role at least).

@tkatila tkatila merged commit 6b17174 into intel:main Jun 25, 2026
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.

2 participants