-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Add HA feature gate and minVersion validation #54539
Add HA feature gate and minVersion validation #54539
Conversation
/test pull-kubernetes-unit |
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.
Generally LGTM but some nits.
Interested in why you cut that dep... seems useful to have by me
cmd/kubeadm/app/features/features.go
Outdated
@@ -22,22 +22,66 @@ import ( | |||
"strconv" | |||
"strings" | |||
|
|||
utilfeature "k8s.io/apiserver/pkg/util/feature" |
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.
why remove this dep?
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 asked that myself. But we're not actually using that much from it, just a few string types, so it doesn't add much value TBH. If we embedded those structs, we'd need to start doing stuff like
HighAvailability: {utilfeature.FeatureSpec{Default: false, PreRelease: alpha}, MinimumVersion: v190},
which looks a bit weird imo.
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 don't really mind either way, we can keep on using it if somebody has a strong preference
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 would like to stay close in sync as possible with upstream, please.
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.
Sure, I will add back those types. However I don't think there is consistent tooling around this for "upstream". Here we're just cribbing off what apiserver does.
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.
heh, can be generally improved indeed, yes
cmd/kubeadm/app/features/features.go
Outdated
) | ||
|
||
var v190, _ = version.ParseSemantic("v1.9.0") |
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.
use MustParseSemantic
cmd/kubeadm/app/features/features.go
Outdated
if requestedVersion == "" { | ||
return nil | ||
} | ||
parsedExpVersion, err := version.ParseGeneric(requestedVersion) |
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.
ParseSemantic
/test pull-kubernetes-unit |
c121e17
to
0ff425d
Compare
/test pull-kubernetes-unit |
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.
/lgtm
You might wanna fix the nit though, otherwise we can't test HA until it's out :)
) | ||
|
||
var v190 = version.MustParseSemantic("v1.9.0") |
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.
sigh that should probably be v1.9.0-alpha.1 😄
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.
@luxas Yep, I'll update this in a follow-up PR
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.
cool, thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jamiehannaford, luxas Associated issue: 261 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 |
Automatic merge from submit-queue (batch tested with PRs 54593, 54607, 54539, 54105). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
As we add more feature gates, there might be occasions where a feature is only available on newer releases of K8s. If a user makes a mistake, we should notify them as soon as possible in the init procedure and not them go down the path of hard-to-debug component issues.
Specifically with HA, we ideally need the new
TaintNodesByCondition
(added in v1.8.0 but working in v1.9.0).Which issue this PR fixes:
kubernetes/kubeadm#261
kubernetes/kubeadm#277
Release note:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @luxas @timothysc