-
Notifications
You must be signed in to change notification settings - Fork 39.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
Validate cgroups-per-qos for Windows #62984
Conversation
/sig windows |
f7283c4
to
6249f6c
Compare
// +build !windows | ||
|
||
/* | ||
Copyright 2017 The Kubernetes Authors. |
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.
s/2017/2018
// +build windows | ||
|
||
/* | ||
Copyright 2017 The Kubernetes Authors. |
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.
s/2017/2018
allErrors := []error{} | ||
|
||
if kc.CgroupsPerQOS { | ||
allErrors = append(allErrors, fmt.Errorf("invalid configuration: CgroupsPerQOS (--cgroups-per-qos) %v is not supported on Windows", kc.CgroupsPerQOS)) |
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.
Have a common formatted string for these two checking? Like
formatStr := "invalid configuration: %s %v is not supported on Windows"
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.
ACK
6249f6c
to
5e3dfdd
Compare
/lgtm |
/retest |
/retest ping @Random-Liu @dchen1107 |
1 similar comment
/retest ping @Random-Liu @dchen1107 |
/retest |
ping @Random-Liu @yujuhong |
/retest |
/retest ping @mtaufen |
/retest |
) | ||
|
||
// ValidatePlatformConfiguration validates platform specific configuration and returns an error if it is invalid. | ||
func ValidatePlatformConfiguration(kc *kubeletconfig.KubeletConfiguration) error { |
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.
We should probably put KubeletConfiguration
somewhere in the name of this function, to keep with the naming scheme of ValidateKubeletConfiguration
.
Since it's included in ValidateKubeletConfiguration
, it can probably be private as well.
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.
We use OS
instead of Platform
in other contexts (see osflags_windows.go
).
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.
ACK
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.
@mtaufen Renamed to validateKubeletOSConfiguration. PTAL
couple nits otherwise looks good |
/retest |
/retest @mtaufen Renamed to validateKubeletOSConfiguration. PTAL |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dixudx, feiskyer, mtaufen 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 |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
@feiskyer: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
cgroups-per-qos and enforce-node-allocatable is not supported on Windows, but kubelet allows it on Windows. And then Pods may stuck in terminating state because of it. Refer #61716.
This PR adds validation for them and make kubelet refusing to start in this case.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #61716
Special notes for your reviewer:
Release note: