Skip to content

[release-2.1] fix: grant the bundle RBAC to the OLM v1 installer ServiceAccount - #3927

Merged
openshift-merge-bot[bot] merged 1 commit into
redhat-developer:release-2.1from
openshift-cherrypick-robot:cherry-pick-3923-to-release-2.1
Oct 26, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
redhat-developer:release-2.1from
openshift-cherrypick-robot:cherry-pick-3923-to-release-2.1

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #3923

/assign zdrapela

prepare-restricted-environment.sh renders an installer ClusterRole for the
OLM v1 path. OLM installs the bundle with that ServiceAccount, and the API
server refuses to create RBAC that grants permissions the installer does not
hold itself ("attempting to grant RBAC permissions not currently held").

The role was not updated when the operator gained access to pods, apiservers,
ingresses and the DevHubPluginCatalog CRD, so OLM v1 installs fail with:

  failed to create resource: clusterroles.rbac.authorization.k8s.io
  "rhdh-operator.v2.2-..." is forbidden: ... attempting to grant RBAC
  permissions not currently held: {pods}, {apiservers}, {ingresses},
  {devhubplugincatalogs}, {devhubplugincatalogs/status}

The Helm release fails halfway: the CRD, the Deployment and the
ClusterRoleBinding are created, so the operator pod runs without any
permissions and reports "forbidden" for every resource it watches.

Add the missing rules, and a check (make check-installer-rbac) that compares
the installer role with the bundle CSV and the ClusterRoles shipped in the
bundle so they cannot drift again.

Assisted-by: OpenCode
@sonarqubecloud

Copy link
Copy Markdown

@zdrapela

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Oct 26, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit e5d5373 into redhat-developer:release-2.1 Oct 26, 2026
4 checks passed
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.

2 participants