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

Enable ExperimentalCriticalPodAnnotation feature gate #3345

Merged

Conversation

a-chernykh
Copy link
Contributor

Otherwise, it is possible that critical system components will be evicted

#3194
kubernetes/kubernetes#51432

Otherwise, it is possible that critical system components will be
evicted

kubernetes#3194
kubernetes/kubernetes#51432

Closes kubernetes#3194
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 6, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @andreychernih. 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 the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 6, 2017
@a-chernykh
Copy link
Contributor Author

/assign @justinsb

@resouer
Copy link

resouer commented Sep 6, 2017

/ok-to-test

@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 Sep 6, 2017
@@ -191,5 +192,8 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
}
clusterSpec.Kubelet.PodInfraContainerImage = image

clusterSpec.Kubelet.FeatureGates = make(map[string]string)
clusterSpec.Kubelet.FeatureGates["ExperimentalCriticalPodAnnotation"] = "true"
Copy link

@resouer resouer Sep 6, 2017

Choose a reason for hiding this comment

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

If you enabled a experimental feature, it worth to document it somewhere.

@a-chernykh
Copy link
Contributor Author

/ping @justinsb

@justinsb
Copy link
Member

justinsb commented Sep 14, 2017

@andreychernih thanks for fixing... this puts us in a messy situation; we don't really want to get into the habit of enabling experimental features by default because they are (by definition) experimental. But in this case it seems that the behaviour when we don't have the flag on is pretty pathological.

One option might be to enable it on k8s 1.8 clusters, for example, and document that, and then hopefully this will eventually become a non-experimental feature.

But this is bad enough that I think it's worth forcing, as you have done. I think at this point we'll cut kops 1.8-alpha as our next release, and then we can just document this as a potentially breaking change in kops 1.8 (which will work for earlier k8s versions also).

I think we need to make sure of a few things:

  • That the user can still set this to false and we won't override that
  • That the user can still set other featureGates
  • That this featureGate doesn't become part of the manifest files that users edit (which I believe is the case)

I think this is achieved by tweaking the logic to be:

if clusterSpec.Kubelet.FeatureGates == nil {
clusterSpec.Kubelet.FeatureGates = make(map[string]string)
}
if _, found := clusterSpec.Kubelet.FeatureGates["ExperimentalCriticalPodAnnotation"]; !found {
clusterSpec.Kubelet.FeatureGates["ExperimentalCriticalPodAnnotation"] = "true"
}

Technically this was only introduced in 1.5.2 IIUC, but people running 1.5 should be running later revisions anyway. I'm not sure whether we want to skip this on 1.4 - again nobody should be running it, but we don't want to break anyone.

But I can try this out and send a PR if you don't get there first!

@andreychernih you are probably very aware of the trade-offs here - do you agree with this analysis?

We have some 1.8 release notes WIP here: https://github.com/kubernetes/kops/blob/master/docs/releases/1.8-NOTES.md

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 19, 2017
@a-chernykh
Copy link
Contributor Author

@justinsb yeah, this makes sense, thanks for looking. I've submitted the changes, can you give it another look, please?

}

return k8sVersion.GTE(*parsedVersion)
Copy link
Member

Choose a reason for hiding this comment

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

Ah - so this is annoying...

The problem is that 1.8.0-alpha.1 is considered to be less than 1.8.0. So 1.8.0-alpha.1 wouldn't match "1.8".

That said, we could just mask out the alpha.1 version before the comparison - I do like this approach!

@justinsb
Copy link
Member

justinsb commented Sep 25, 2017

/lgtm

I'm going to mask out the alpha-1, as this is actually great and I want this change in the first kops 1.8 alpha :-)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 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 Sep 25, 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 fc37166 into kubernetes:master Sep 25, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants