Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rbac): missing clusterrolebinding permission #3547

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

claudio4j
Copy link
Contributor

When camel-k-operator is installed in global mode, pkg/install/knative.go wants to patch a ClusterRoleBinding, but it fails with

Cannot bind the Knative addressable resolver aggregated ClusterRole: skipping
Error while binding the Knative Addressable resolver aggregated ClusterRole",
  "error":"clusterrolebindings.rbac.authorization.k8s.io \"camel-k-operator-addressable-resolver\" is forbidden: User \"system:serviceaccount:cmiranda-ops:camel-k-operator\" cannot patch resource \"clusterrolebindings\" in API group \"rbac.authorization.k8s.io\" at the cluster scope"}

There is a missing permission to patch it.

$ k auth can-i -A patch clusterrolebindings.rbac.authorization.k8s.io --as=system:serviceaccount:cmiranda-ops:camel-k-operator
no

Release Note

NONE

@claudio4j
Copy link
Contributor Author

@christophd for review

Copy link
Contributor

@christophd christophd left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

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

LGTM

@tadayosi tadayosi merged commit b0e974e into apache:main Aug 18, 2022
@tadayosi
Copy link
Member

@claudio4j I think there should be an E2E test that captures the failing case so that it won't regress. Is it possible to create one?

@claudio4j claudio4j deleted the fix_rbac_crb_main branch August 19, 2022 13:35
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.

None yet

3 participants