-
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
Make kubelet topology-manager-policy configurable #8833
Conversation
199b7f3
to
b5cde0a
Compare
/lgtm |
Would have been easier to review if the refactor and the addition were in separate commits. |
} | ||
} | ||
|
||
if c.IsKubernetesGTE("1.10") { |
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.
This will panic if the version in the cluster spec is unparseable. Not something that should happen in the validation code. It should keep the old logic of checking kubernetesRelease
.
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.
Good catch. I think that getting this far with an unparseable kubernetes version is undefined behaviour though. While I like outputting all errors (or as many as possible) in one go, I think an unparseable kubernetes version should just return the error immediately.
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 wouldn't agree it counts as "undefined behavior". It is, admittedly, a hard thing to unit test for. I could see us deciding that an unparseable Kubernetes version is one error we don't try to combine with others.
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.
Given how much validation logic depends on a parseable Kubernetes version, I would be in favor of returning a single error early if it isn't parseable.
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.
If I read the code correctly, the old code just continued on with 1.15 as the kubernetes version. Changed this to returning early now.
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 suppose another approach would be to DeepCopy the Cluster and put 1.15 in the copy's KubernetesVersion.
Co-Authored-By: John Gardiner Myers <jgmyers@proofpoint.com>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olemarkus, 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.