-
Notifications
You must be signed in to change notification settings - Fork 42k
kubeadm: check required number of CPUs on master #70048
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
kubeadm: check required number of CPUs on master #70048
Conversation
neolit123
left a comment
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 @bart0sh
added a couple of minor comments, 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.
let's use a table of the test cases like var tests = []struct {...
line 690.
cmd/kubeadm/app/preflight/checks.go
Outdated
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.
number of CPUs %d is less than required %d
-->
the number of available CPUs %d is less than the required %d
db07f1b to
198f914
Compare
|
@neolit123 Thanks for the review! Updated. |
cmd/kubeadm/app/preflight/checks.go
Outdated
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.
contents of Errorf() should start will lowercase.
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.
FYI we gravitate towards using subtests with t.Run for new code, but not critical here.
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.
instead of 2^31-1 we might as well hardcode a very big int like 99999999, for better readability?
and so that we don't include math.
also having test names is a plus.
Implemented preflight check to ensure that number of CPUs on the master node is not less than required.
198f914 to
d230b24
Compare
|
/test pull-kubernetes-e2e-kops-aws |
|
/retest |
|
one argument here would be if we want it as a warning or an error. /lgtm |
timothysc
left a comment
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
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bart0sh, timothysc The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Implemented preflight check to ensure that number of CPUs
on the master node is not less than required.
Does this PR introduce a user-facing change?: