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

Fail to deploy an addon using addon template #226

Closed
zhujian7 opened this issue Jul 20, 2023 · 1 comment · Fixed by open-cluster-management-io/open-cluster-management-io.github.io#373
Labels
bug Something isn't working

Comments

@zhujian7
Copy link
Member

Describe the bug
I am trying to use the addon template feature to rewrite the managed-serviceaccount API, which needs to create these permissions on the hub cluster:

but I got error when deploying the addon:

#managedClusterAddon 
    message: |-
      Failed to set permission for hub agent: rolebindings.rbac.authorization.k8s.io "open-cluster-management:managed-serviceaccount:clusterrole:agent" is forbidden: user "system:serviceaccount:open-cluster-management-hub:addon-manager-controller-sa" (groups=["system:serviceaccounts" "system:serviceaccounts:open-cluster-management-hub" "system:authenticated"]) is attempting to grant RBAC permissions not currently held:
      {APIGroups:[""], Resources:["configmaps"], Verbs:["*"]}
      {APIGroups:[""], Resources:["secrets"], Verbs:["*"]}
      {APIGroups:["authentication.open-cluster-management.io"], Resources:["managedserviceaccounts"], Verbs:["get" "list" "watch"]}
      {APIGroups:["authentication.open-cluster-management.io"], Resources:["managedserviceaccounts/status"], Verbs:["get" "update" "patch"]}
      {APIGroups:["coordination.k8s.io"], Resources:["leases"], Verbs:["*"]}
    reason: SetPermissionFailed
    status: "False"
    type: RegistrationApplied

To Reproduce
Steps to reproduce the behavior:

Expected behavior
The addon can be deployed successfully. OR some docs explain how to hand this.

Environment ie: OCM version, Kubernetes version and provider:

Additional context
Add any other context about the problem here.

@zhujian7
Copy link
Member Author

zhujian7 commented Aug 8, 2023

Add some doc to explain how to grant permissions for the addon manager to address this issue: open-cluster-management-io/open-cluster-management-io.github.io#373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant