rbac-tool: Add support for namespace-specific ServiceAccount lookups in the lookup command#124
Open
ravisastryk wants to merge 1 commit intoalcideio:masterfrom
Conversation
Author
|
@gadinaor Can you please review when you get a chance? |
gadinaor-r7
requested changes
Aug 13, 2025
| subject.Name, | ||
| subject.Kind, | ||
| scope, | ||
| subjNamespace, |
Contributor
There was a problem hiding this comment.
The original code tracks the role namespace, and here it changes to the subject namespace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for namespace-specific ServiceAccount lookups in the lookup command.
This is an attempt to help the contributors/users using the
rbac-toolto take advantage of command line option to lookup serviceaccount with specific namespace.Problem
It was reported in the issue#123 where previously, the
rbac-toollookup command could search for ServiceAccounts by name, but did not allow users to specify a namespace. As a result:awkto lookup.That is, the following command failed to directly perform lookup
Fix/Solution
This PR introduces a
--namespaceflag to the lookup command. When specified:Example Usage
Output