-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Balk at using Kubernetes versions too new to be supported #8700
Conversation
5d0ab5e
to
8db90a3
Compare
/retest |
e2e test is failing because it is trying to use a k8s 1.19 alpha, which the added code prevents. |
tooNewVersion.Minor += 1 | ||
tooNewVersion.Pre = nil | ||
tooNewVersion.Build = nil | ||
if util.IsKubernetesGTE(tooNewVersion.String(), *parsed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about GT vs GTE. I think this means that e.g. kops 1.18 won't be able to run k8s 1.19 alpha.1 ?
It's probably fine but you know me - super careful!
Shall we discuss in office hours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intended for kops 1.18 to balk at running k8s 1.19.0-alpha.1 (unless the environment variable was set)
And it won't, thus the e2e failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw that after I commented :-)
It does mean that whatever tests we're still running against k8s HEAD will break at some random point in the cycle when k/k cuts the next alpha. OTOH that might be a good prompt for us to cut the branch for the next release - though it is typically pretty early in the cycle meaning we'd have to do a lot of cherry picks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW this test-infra PR will fix the prow tests: https://github.com/kubernetes/test-infra/pull/16678/files
Another option we could do is to set these guidelines in the channel file ( |
Would we expect to change this guideline post-release? If not, I don't see the benefit of setting this in the channel file. |
Any special reason this is desired? I would rather not have this behaviour at all, especially not another env var. Anyone that chooses a newer Kubernetes version does this already at its own risk by setting it manually in the cluster spec. |
I've seen several issues filed by users who were using older versions of kops than the Kubernetes they were running, with no idea that wasn't supported. It would be to the users' benefit if kops declined to perform actions that are so risky to merit an explicit disclaimer of support. |
We have to find a balance between users not reading any docs and develoment pain. Having env vars required to test newer k8s versions is not pleasant. I think a good balance would be to keep only the warning. |
Setting an environment variable is easy, particularly compared to having to host your own assets. I believe this is a case where the needs of the users outweigh convenience to developers. The environment variable override is the pattern established by the code handling k8s versions marked as obsolete in the channel. |
This is an old piece of code that will probably be replaced by the new approach of not supporting old releases in 1.19 or 1.20. I think this is something on which we will disagree. From my point of view, env vars are unfriendly. Even the message is annoying to see every time you run a command. This is not a tool for the casual user. If someone doesn't spend the time to even check the compatibility matrix, there is a very slim chance that it will be able to host its own cluster. |
FWIW the place I have seen problems here is where one admin forgets to update kops locally and accidentally causes problems. Say what you want about such mistakes, but it does happen. |
OK. Can we do it in such a way that it only applies to official releases? |
Heh, our wrapper around kops puts its version in an annotation on the cluster spec. It then requires a flag to run an older version on that cluster. |
/retest |
we decided during last office hours that this is good to merge. developers can set the env var in their shell, and CI jobs will do the same according to the test-infra PR linked above. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers, rifelpet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No description provided.