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

Allow setting service account with kubectl run #46318

Merged

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented May 24, 2017

As more containers need to make use of the API, and more clusters are RBAC-enabled, which service account is used to run a particular container becomes more important.

This adds support to existing generators for setting the service account name in the pod spec.

`kubectl run` learned how to set a service account name in the generated pod spec with the `--serviceaccount` flag.

related to #45147

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 24, 2017
@liggitt
Copy link
Member Author

liggitt commented May 24, 2017

@kubernetes/sig-cli-pr-reviews

@k8s-ci-robot k8s-ci-robot added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label May 24, 2017
@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels May 24, 2017
@liggitt
Copy link
Member Author

liggitt commented May 24, 2017

@k8s-bot pull-kubernetes-e2e-kops-aws test this

@smarterclayton
Copy link
Contributor

I had expected --as-service-account, but that's a few more characters. But it more clearly indicates what service account is for.

@liggitt
Copy link
Member Author

liggitt commented May 26, 2017

I had expected --as-service-account, but that's a few more characters. But it more clearly indicates what service account is for.

it's too close to --as for my taste, and matches kubectl create rolebinding/clusterrolebinding --serviceaccount=...

@liggitt
Copy link
Member Author

liggitt commented Jun 1, 2017

@fabianofranz PTAL

@k8s-github-robot k8s-github-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2017
@fabianofranz
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fabianofranz, liggitt

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

The full list of commands accepted by this bot can be found here.

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

@liggitt
Copy link
Member Author

liggitt commented Jun 11, 2017

/retest

1 similar comment
@liggitt
Copy link
Member Author

liggitt commented Jun 24, 2017

/retest

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2017
@liggitt
Copy link
Member Author

liggitt commented Jun 24, 2017

/retest

4 similar comments
@liggitt
Copy link
Member Author

liggitt commented Jun 24, 2017

/retest

@liggitt
Copy link
Member Author

liggitt commented Jun 25, 2017

/retest

@liggitt
Copy link
Member Author

liggitt commented Jun 27, 2017

/retest

@liggitt
Copy link
Member Author

liggitt commented Jul 12, 2017

/retest

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2017
@liggitt liggitt force-pushed the kubectl-run-service-account branch from a6418eb to e8f2879 Compare July 15, 2017 16:37
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 15, 2017
@liggitt
Copy link
Member Author

liggitt commented Jul 15, 2017

rebased

@liggitt liggitt added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 15, 2017
@liggitt
Copy link
Member Author

liggitt commented Jul 15, 2017

flake on stage push-build.sh
/test pull-kubernetes-e2e-gce-etcd3

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 6610daa into kubernetes:master Jul 15, 2017
@liggitt liggitt deleted the kubectl-run-service-account branch July 17, 2017 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants