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

Show directly related ClusterRoles&Bindings when resource not specified #8

Open
luksa opened this issue Jun 2, 2019 · 0 comments
Open

Comments

@luksa
Copy link
Collaborator

luksa commented Jun 2, 2019

Using the example RBAC resources from examples/create-example-rbac-rules.sh, as you would expect, if you run

kubectl rback -n namespace1 sa

rback shows three additional (Cluster)RoleBindings that aren't in namespace1, but reference ServiceAccounts in that namespace.

But if you run

kubectl rback -n namespace1

those three additional (Cluster)RoleBindings aren't shown. IMHO, they should be, since they are all directly related to some resources in namespace1. When you don't specify a resource kind, but do specify a namespace, rback should show all RBAC resources from namespace1 plus all directly related resources (from any other namespace or cluster-scope).

It should show:

  • all (Cluster)RoleBindings that reference any ServiceAccount from the namespace
  • all subjects that are referenced by RoleBindings in the namespace (*rback already does this)
  • all ClusterRoles that are referenced by RoleBindings in the namespace (*rback already does this)
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

No branches or pull requests

1 participant