-
Notifications
You must be signed in to change notification settings - Fork 474
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 validation of Kubernetes feature gates #4149
Add validation of Kubernetes feature gates #4149
Conversation
/invite @BeckerMax @timebertt @rfranzke Even though this is still draft (unit tests are missing), could you please take a look and let me know if you are ok with the overall approach, having in mind the manual effort mentioned in "special notes" above? |
/assign |
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 think the approach is fine, I had something similar in mind. Thank you!
facad4e
to
2b8fb41
Compare
/cc @BeckerMax @timebertt @rfranzke I consider this PR ready for review now. Note: I compare the new map prepared as described above with the one I had previously (based on the docu). Most of the differences were exactly what I would expect, except:
In both cases, I assume the docu is wrong and the code is right. If you have time, you might want to take a look at this, I could still be making a mistake somewhere. |
@timebertt, @BeckerMax You have pull request review open invite, please check |
babdde1
to
ed61489
Compare
Addressed all feedback so far in a separate commit. |
@stoyanr You have pull request review with status CHANGES_REQUESTED, please check |
1 similar comment
@stoyanr You have pull request review with status CHANGES_REQUESTED, please check |
WDYT - should the release responsible check if the feature gates where updated if needed? |
No, the it's not needed, usually feature gates are only added/deleted with new minor Kubernetes version. Hence, there is no necessity for the Gardener release responsible to check the feature gates when a new Gardener version is validated. It's only needed when support for a new Kubernetes version is contributed (e.g., #3860 or similar). :) |
ed61489
to
c5265b6
Compare
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
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.
Thanks!
/lgtm
* Add validation of Kubernetes feature gates * Add validation of Kubernetes feature gates code review changes
* Add validation of Kubernetes feature gates * Add validation of Kubernetes feature gates code review changes
How to categorize this PR?
/area usability
/area ops-productivity
/kind enhancement
What this PR does / why we need it:
Adds validation of Kubernetes feature gates, as requested in #3987.
Which issue(s) this PR fixes:
Fixes #3987
Special notes for your reviewer:
The initial implementation was based on the information contained in https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates. We agreed with @rfranzke to change the approach completely and base it on the diff of https://github.com/kubernetes/kubernetes/blob/master/pkg/features/kube_features.go from one version to the other, starting with 1.15 (the minimum supported one). This should give us much better quality of the data.
I added the script
hack/compare-k8s-feature-gates.sh
to prepare this diff automatically and used it to fill the initial map. For each new Kubernetes version from now on, the person manually maintaining the map infeaturegates.go
would have to:hack/compare-k8s-feature-gates.sh <old-version> <new-version>
. It will present 2 lists of feature gates: those added and those removed in<new-version>
compared to<old-version>
.<new-version>
asMinVersion
and noMaxVersion
.<new-version>
asMaxVersion
to the already existing feature gate in the map.The manual effort is really low now and requires no more than 5 minutes for each new version.
Release note: