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

kubeadm: Make kubeadm use the right CSR approver for the right version #46864

Merged
merged 1 commit into from
Jun 6, 2017

Conversation

luxas
Copy link
Member

@luxas luxas commented Jun 2, 2017

What this PR does / why we need it:

fixes regression caused in: #45619

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Fixes: kubernetes/kubeadm#289

Special notes for your reviewer:

cc @pipejakob our e2e CI should probably go green after this change

Release note:

NONE

@mikedanese @pipejakob @timothysc @liggitt

@luxas luxas added the kind/bug Categorizes issue or PR as related to a bug. label Jun 2, 2017
@luxas luxas added this to the v1.7 milestone Jun 2, 2017
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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.

2 similar comments
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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 the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 2, 2017
@luxas luxas force-pushed the kubeadm_fix_v16_csrs branch from 0bcdcb8 to 3da0f28 Compare June 2, 2017 15:21
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 2, 2017
@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Jun 2, 2017
@luxas luxas force-pushed the kubeadm_fix_v16_csrs branch from 3da0f28 to ead8e40 Compare June 2, 2017 16:05
@pipejakob
Copy link
Contributor

@luxas Cool, but as a heads-up, our CI job was failing because of quota issues (fixed now), but hasn't rerun in a while because the submit queue is a little broken now (it seems that someone manually merged some commits that broke verification). No new commits have been merged into kubernetes for 16 hours or so, so it hasn't run in that long. That's not to say there weren't also other regressions caused by #45619 that might appear now, though.

I believe @spxtr is the test-infra on-call and is looking into unblocking the submit queue.

@pipejakob
Copy link
Contributor

Actually, looks like #46863 should take care of it.

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jun 2, 2017

@luxas: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce ead8e401a1f10a4e0b30b69018a67f4c67754f51 link @k8s-bot pull-kubernetes-federation-e2e-gce test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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
Copy link
Member

liggitt commented Jun 2, 2017

it wasn't a merge that broke master, it was a new git tag :-/

if k8sVersion.LessThan(kubeadmconstants.MinimumCSRSARApproverVersion) {
// enable the former CSR group approver for v1.6 clusters.
// TODO(luxas): Remove this once we're targeting v1.8 at HEAD
defaultArguments["insecure-experimental-approve-all-kubelet-csrs-for-group"] = bootstrapapi.BootstrapGroup
Copy link
Member

Choose a reason for hiding this comment

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

how was this being set before?

Copy link
Member Author

Choose a reason for hiding this comment

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

@liggitt It was being set unconditionally in the defaultArguments slice initializer above. Now only for v1.6

Copy link
Member

Choose a reason for hiding this comment

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

ah, and got removed by the SAR PR. ok.

@pipejakob
Copy link
Contributor

@liggitt Yeah, Joe pointed out #46863 to me. Thanks for the fix!

@liggitt
Copy link
Member

liggitt commented Jun 2, 2017

this LGTM, but bazel is very unhappy

@luxas
Copy link
Member Author

luxas commented Jun 2, 2017

I'll fixup the tests tomorrow or so, late here now.
@mikedanese it would be awesome if I could get a soft approval on this and be able to self-apply once I have generated code and tests uploaded.

@luxas
Copy link
Member Author

luxas commented Jun 2, 2017

@pipejakob Is there a way to invoke the kubeadm CI with a (@)k8s-bot command btw?

@pipejakob
Copy link
Contributor

@k8s-bot pull-kubernetes-e2e-kubeadm-gce test this

@pipejakob
Copy link
Contributor

Oh, the kubeadm pull job actually depends on a successful completion of the bazel pull job (that's the step that builds/uploads the .debs we use), so I can't successfully trigger it until you have pull-kubernetes-bazel passing.

@@ -54,7 +55,7 @@ const (
)

var (
v170 = version.MustParseSemantic("v1.7.0-alpha.0")
v170alpha0 = version.MustParseSemantic("v1.7.0-alpha.0")
Copy link
Member

Choose a reason for hiding this comment

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

I actually prefer the v170 b/c we should only support released versions, correct?

@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
@liggitt
Copy link
Member

liggitt commented Jun 6, 2017

@luxas are you able to update this to fix bazel and tests?

@luxas
Copy link
Member Author

luxas commented Jun 6, 2017

@liggitt Will do in a couple of hours. Sorry for the slight delay, am partially/have been OOO.

@liggitt liggitt added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/auth Categorizes an issue or PR as relevant to SIG Auth. labels Jun 6, 2017
@luxas luxas force-pushed the kubeadm_fix_v16_csrs branch from ead8e40 to de2ef8f Compare June 6, 2017 04:47
@luxas
Copy link
Member Author

luxas commented Jun 6, 2017

@k8s-bot pull-kubernetes-e2e-kubeadm-gce test this

@liggitt
Copy link
Member

liggitt commented Jun 6, 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 Jun 6, 2017
@liggitt
Copy link
Member

liggitt commented Jun 6, 2017

would like to see a green CI run for kubeadm - https://k8s-gubernator.appspot.com/pr/46864

@luxas
Copy link
Member Author

luxas commented Jun 6, 2017

/approve no-issue

I must do this due to kubernetes/test-infra#2975

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

Automatic merge from submit-queue (batch tested with PRs 46897, 46899, 46864, 46854, 46875)

@k8s-github-robot k8s-github-robot merged commit f04a774 into kubernetes:master Jun 6, 2017
k8s-github-robot pushed a commit that referenced this pull request Jun 8, 2017
Automatic merge from submit-queue

kubeadm: Enable the Node Authorizer/Admission plugin in v1.7

**What this PR does / why we need it**:

This is similar to #46796, but for kubeadm.
Basically it was a part of #46796, but there were some other upgradability and compability concerns for kubeadm I took care of while working today.

Example:

```console
$ kubeadm init --kubernetes-version v1.7.0-beta.0
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.0-beta.0
[init] Using Authorization mode: [RBAC Node]
...
$ sudo kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get secret foo
Error from server (Forbidden): User "system:node:thegopher" cannot get secrets in the namespace "default".: "no path found to object" (get secrets foo)

$ echo '{"apiVersion":"v1","kind":"Node","metadata":{"name":"foo"}}' | sudo kubectl create -f - --kubeconfig=/etc/kubernetes/kubelet.conf
Error from server (Forbidden): error when creating "STDIN": nodes "foo" is forbidden: node thegopher cannot modify node foo
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

Depends on #46864 (uses that PR as a base, will rebase once it's merged)

Please only review the second commit. Will also fix tests in a minute.

**Release note**:

```release-note
kubeadm: Enable the Node Authorizer/Admission plugin in v1.7 
```
@mikedanese @liggitt @pipejakob @roberthbailey @jbeda @timothysc
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploying v1.6 clusters with kubeadm at HEAD is broken
7 participants