Role and Clusterrole binding are not generated correctly #760
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/feature
Categorizes issue or PR as related to a new feature.
CONTROLLER_TOOLS_VERSION=v0.10.0
command:
controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
What I did:
My controller needs to access both a cluster resource and a namespaced one so I use both annotations to autogenerate rbac rules.
What happened:
When annotating the controller with both namespaced and cluster rbac rules both roles are created but, only one binding.
What I would expect:
Both bindings for the clusterrole and the role are generated
How To Reproduce:
Run
make manifests
orcontroller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
Observe that the role.yaml file has both ClusterRole and Role correctly generated
Temporary fix
I could manually add the other binding and list it in the kustomization.yaml, but I would expect the tool to generate both in the role_binding.yaml
The text was updated successfully, but these errors were encountered: