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

use StringArray in create rolebindings #43903

Merged

Conversation

@xilabao
Copy link
Contributor

commented Mar 31, 2017

@liggitt I think maybe you like this.

`kubectl create rolebinding` and `kubectl create clusterrolebinding` no longer allow specifying multiple subjects as comma-separated arguments. Use repeated `--user`, `--group`, or `--serviceaccount` arguments to specify multiple subjects. 
@k8s-reviewable

This comment has been minimized.

Copy link

commented Mar 31, 2017

This change is Reviewable

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Mar 31, 2017

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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@liggitt

This comment has been minimized.

Copy link
Member

commented Mar 31, 2017

@k8s-bot ok to test

@liggitt

This comment has been minimized.

Copy link
Member

commented Mar 31, 2017

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

@liggitt

This comment has been minimized.

Copy link
Member

commented Mar 31, 2017

Can you sweep docs to make sure all examples use the repeated flag forms? Thanks.

@eparis

This comment has been minimized.

Copy link
Member

commented Apr 3, 2017

Do we care this can/will break things that work today?

@liggitt

This comment has been minimized.

Copy link
Member

commented Apr 3, 2017

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

@xilabao

This comment has been minimized.

Copy link
Contributor Author

commented Apr 3, 2017

I confirm that the examples of rolebinding are correct.

@liggitt

This comment has been minimized.

Copy link
Member

commented Apr 3, 2017

@k8s-bot ok to test
LGTM

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")

This comment has been minimized.

Copy link
@liggitt

liggitt Apr 3, 2017

Member

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>)

This comment has been minimized.

Copy link
@xilabao

xilabao Apr 5, 2017

Author Contributor

Done.

@mengqiy

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2017

@k8s-bot gci gce e2e test this

@xilabao xilabao force-pushed the xilabao:use-StringArray-for-user branch from 9a99173 to 33e5597 Apr 5, 2017
@liggitt

This comment has been minimized.

Copy link
Member

commented Apr 5, 2017

/assign /lgtm

@mengqiy

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2017

/lgtm
/assign @liggitt

@liggitt

This comment has been minimized.

Copy link
Member

commented Apr 5, 2017

/approve

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2017

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2017

Automatic merge from submit-queue (batch tested with PRs 44104, 43903, 44109)

@k8s-github-robot k8s-github-robot merged commit 3160d72 into kubernetes:master Apr 6, 2017
13 checks passed
13 checks passed
Jenkins Bazel Build Build succeeded.
Details
Jenkins GCE Node e2e Build succeeded.
Details
Jenkins GCE e2e Build succeeded.
Details
Jenkins GCE etcd3 e2e Build succeeded.
Details
Jenkins GCI GCE e2e Build succeeded.
Details
Jenkins Kubemark GCE e2e Build succeeded.
Details
Jenkins kops AWS e2e Build succeeded.
Details
Jenkins non-CRI GCE Node e2e Build succeeded.
Details
Jenkins non-CRI GCE e2e Build succeeded.
Details
Jenkins unit/integration Build succeeded.
Details
Jenkins verification Build succeeded.
Details
Submit Queue Queued to run github e2e tests a second time.
Details
cla/linuxfoundation xilabao authorized
Details
k8s-github-robot pushed a commit that referenced this pull request May 15, 2017
…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. 
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.