-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
use StringArray in create rolebindings #43903
use StringArray in create rolebindings #43903
Conversation
Hi @xilabao. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@k8s-bot ok to test |
I do like it. cc @kubernetes/sig-cli-pr-reviews @kubernetes/sig-cli-misc we should add this to the conventions/code review guidelines. Any value that could possibly contain a comma should use StringArray, not StringSlice |
Can you sweep docs to make sure all examples use the repeated flag forms? Thanks. |
Do we care this can/will break things that work today? |
I do care, but given the youth of the commands, and that all the examples I could find used repetition, and that this is required to have any reasonable way to express bindings for user or group names with commas, I think it's worth it |
I confirm that the examples of rolebinding are correct. |
@k8s-bot ok to test |
cmd.Flags().StringSlice("serviceaccount", []string{}, "service accounts to bind to the role") | ||
cmd.Flags().StringArray("user", []string{}, "usernames to bind to the role") | ||
cmd.Flags().StringArray("group", []string{}, "groups to bind to the role") | ||
cmd.Flags().StringArray("serviceaccount", []string{}, "service accounts to bind to the role") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while, you're touching this, add the expected format to the flag help (service accounts to bind to the role, in the format <namespace>:<name>
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@k8s-bot gci gce e2e test this |
9a99173
to
33e5597
Compare
/assign /lgtm |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, xilabao, ymqytw
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 44104, 43903, 44109) |
…eName Automatic merge from submit-queue use StringArrayVar for ResourceName ref to #43903 ```release-note `kubectl create role` and `kubectl create clusterrole` no longer allow specifying multiple resource names as comma-separated arguments. Use repeated `--resource-name` arguments to specify multiple resource names. ```
@liggitt I think maybe you like this.