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

validate: extend to check and store the cluster version #83

Merged
merged 7 commits into from
Feb 14, 2022

Conversation

ffromani
Copy link
Collaborator

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.

@ffromani
Copy link
Collaborator Author

/cc @jlojosnegros

@ffromani ffromani force-pushed the update-validation branch 3 times, most recently from 6f9dfcc to 1e549a9 Compare February 13, 2022 10:41
Copy link

@cynepco3hahue cynepco3hahue left a 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

pkg/validator/kubeletconfig_test.go Outdated Show resolved Hide resolved
pkg/validator/kubeletconfig.go Outdated Show resolved Hide resolved
pkg/validator/clusterversion.go Outdated Show resolved Hide resolved
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]>
Use k8s constants, where available, for the expected values.

Signed-off-by: Francesco Romani <[email protected]>
@ffromani ffromani merged commit ea4e77b into k8stopologyawareschedwg:main Feb 14, 2022
@ffromani ffromani deleted the update-validation branch February 14, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants