-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Enable allocatable support for Windows nodes #69960
Conversation
/sig windows /assign @PatrickLang @yujuhong |
/retest |
1 similar comment
/retest |
Kindly ping @yujuhong @PatrickLang. Could you help to take a look at the PR? |
/test pull-kubernetes-cross |
Sounds like a nice improvement! I have nothing to add to the review. I'm not quite in a position to help test this yet, our automated tests on GCE are coming along but not fully ready. |
@@ -213,30 +211,6 @@ func (cm *containerManagerImpl) GetNodeAllocatableReservation() v1.ResourceList | |||
return result | |||
} | |||
|
|||
// hardEvictionReservation returns a resourcelist that includes reservation of resources based on hard eviction thresholds. |
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.
Hmm...Rename this file to node_container_manager_linux.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
// Interface for cadvisor. | ||
cadvisorInterface cadvisor.Interface | ||
// Config of this node. | ||
nodeConfig NodeConfig | ||
} | ||
|
||
var _ ContainerManager = &containerManagerImpl{} |
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.
nit: This is redundant.
} | ||
|
||
func (cm *containerManagerImpl) InternalContainerLifecycle() InternalContainerLifecycle { | ||
return &internalContainerLifecycleImpl{cpumanager.NewFakeManager()} |
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.
What's the point of returning a fake manager in production?
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 is actually same with stub container manager, which is only for conforming to the interfaces, but without actual actions.
@@ -19,28 +19,149 @@ limitations under the License. | |||
package cm | |||
|
|||
import ( | |||
"github.com/golang/glog" | |||
"fmt" |
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.
Please add a paragraph comment in this file explaining the status of this "containermangerImpl" 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
Looks good overall with some nits. |
ec63a21
to
856c83e
Compare
@yujuhong Addressed comments. PTAL |
/test pull-kubernetes-local-e2e-containerized |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, yujuhong 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 |
What type of PR is this?
What this PR does / why we need it:
This PR enables kubelet options
--system-reserved
and--kube-reserved
on Windows nodes.Without this change, Windows nodes' allocatable are always same as capacity, even if you have set both options, e.g.
--system-reserved=cpu=100m,memory=100Mi,ephemeral-storage=1Gi --kube-reserved=cpu=1200m,memory=100Mi,ephemeral-storage=1Gi
:After this change, allocatable would be
capacity- system-reserverd - kube-reserved
: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 #69938
Special notes for your reviewer:
Note that
--enforce-node-allocatable
is still not supported because there's no cgroups support on Windows.Does this PR introduce a user-facing change?: