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 system:kube-router User for clusterrole binding #3522

Merged

Conversation

murali-reddy
Copy link
Contributor

@murali-reddy murali-reddy commented Oct 3, 2017

Kube-router as it provides service proxy as well, it has a chicken-egg problem (can not
access api server till it can setup service proxy), so service account are not usable. certificate generated for kube-router has CN system:kube-router, so user system:kube-router need to be given necessary RBAC permissions

Fixes #3463

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 3, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @murali-reddy. 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 /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.

I understand the commands that are listed here.

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-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 3, 2017
@murali-reddy
Copy link
Contributor Author

/assign @zmerlynn

@murali-reddy
Copy link
Contributor Author

Is pull-kops-e2e-kubernetes-aws stuck? Is there any thing i have todo?

@chrislovecnm
Copy link
Contributor

chrislovecnm commented Oct 5, 2017

@liggitt or @erictune either of you guys have a chance to review? My RBAC-fu is not quite on par yet.

/ok-to-test

@murali-reddy e2e only starts for k8s members automatically. One of us has to add the above line for the bot to fire off the test. How many k8s prs have you done?

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 5, 2017
@murali-reddy
Copy link
Contributor Author

@chrislovecnm 3 PR's so far all to the kops

apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-router
subjects:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can add this as a second subject to the existing kube-router binding

 subjects:
- kind: ServiceAccount
  name: kube-router
  namespace: kube-system
- kind: User
  name: system:kube-router
  apiGroup: rbac.authorization.k8s.io

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@murali-reddy nit pick but do we need apiGroup: rbac.authorization.k8s.io Write

subjects:
- kind: User
name: system:kube-router
namespace: kube-system
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

users don't have namespaces

@liggitt
Copy link
Member

liggitt commented Oct 5, 2017

nit on combining subjects into a single binding, other changes look fine

system:kube-router need to be given necessary RBAC permissions

Fixes kubernetes#3463
@murali-reddy
Copy link
Contributor Author

murali-reddy commented Oct 5, 2017

Updated the patch as per the comments. Thanks @liggitt

@chrislovecnm
Copy link
Contributor

@liggitt really appreciate all of the RBAC reviews you do for us!

@justinsb
Copy link
Member

justinsb commented Oct 9, 2017

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2017
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue.

@k8s-github-robot k8s-github-robot merged commit 211dab1 into kubernetes:master Oct 9, 2017
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants