-
Notifications
You must be signed in to change notification settings - Fork 8
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
validate: extend to check and store the cluster version #83
Merged
ffromani
merged 7 commits into
k8stopologyawareschedwg:main
from
ffromani:update-validation
Feb 14, 2022
Merged
validate: extend to check and store the cluster version #83
ffromani
merged 7 commits into
k8stopologyawareschedwg:main
from
ffromani:update-validation
Feb 14, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/cc @jlojosnegros |
ffromani
force-pushed
the
update-validation
branch
3 times, most recently
from
February 13, 2022 10:41
6f9dfcc
to
1e549a9
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.
Except unittests look good to me
Tal-or
reviewed
Feb 13, 2022
The kubernetes discovery client allows to introspect the cluster capabilities, for example the API server. Add support in the clientutil to create such a client. Signed-off-by: Francesco Romani <[email protected]>
Overhaul the `validate` package to check and store the cluster version. Breaks the API - will require a major bump. In this change, we add support to check the cluster version, enabling smarter validation check down the road (e.g. feature gates). Now validation helpers can (and should) alter the validation state accumulating intermediate results - while still returning their specific validation results. Same goes for the cluster version - it needs to be stored in the Validator object, and possibly to be checked first. This is why we introduce and recommend create functions. Signed-off-by: Francesco Romani <[email protected]>
We expect the MemoryManager to be enabled with the Static policy, so we add an explicit check to verify this behaviour. Signed-off-by: Francesco Romani <[email protected]>
It's a bit silly to use a constant for the expected value in the reporting but not in the actual check, so let's fix this using the named constant in both places. Signed-off-by: Francesco Romani <[email protected]>
Add validation check to verify _some_ resources are reserved. We don't want yet to validate the amount of resources nor their NUMA topology. so we just check _something_ has been reserved. Signed-off-by: Francesco Romani <[email protected]>
Complete the kubelet configuration with the memory manager parameters; makes the config more correct and should also let the deployer validation pass. Signed-off-by: Francesco Romani <[email protected]>
ffromani
force-pushed
the
update-validation
branch
from
February 13, 2022 14:43
5552607
to
1218de4
Compare
Use k8s constants, where available, for the expected values. Signed-off-by: Francesco Romani <[email protected]>
ffromani
force-pushed
the
update-validation
branch
from
February 13, 2022 14:47
1218de4
to
2a97f27
Compare
cynepco3hahue
approved these changes
Feb 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overhaul the
validate
package to check and store the cluster version.Breaks the API - will require a major bump.
In this change, we add support to check the cluster version, enabling smarter validation check down the road (e.g. feature gates).
Now validation helpers can (and should) alter the validation state accumulating intermediate results - while still returning their specific validation results.
Same goes for the cluster version - it needs to be stored in the Validator object, and possibly to be checked first. This is why we introduce and recommend create functions.