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

Merged
merged 1 commit into from Oct 31, 2018

Conversation

@feiskyer
Member

feiskyer commented Oct 18, 2018

What type of PR is this?

Uncomment only one, leave it on its own line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

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:

Capacity:
 attachable-volumes-azure-disk:  4
 cpu:                            2
 ephemeral-storage:              0
 memory:                         8388148Ki
 pods:                           110
Allocatable:
 attachable-volumes-azure-disk:  4
 cpu:                            2
 ephemeral-storage:              0
 memory:                         8388148Ki
 pods:                           110

After this change, allocatable would be capacity- system-reserverd - kube-reserved:

Capacity:
 attachable-volumes-azure-disk:  4
 cpu:                            2
 ephemeral-storage:              268075004Ki
 memory:                         8388148Ki
 pods:                           110
Allocatable:
 attachable-volumes-azure-disk:  4
 cpu:                            700m
 ephemeral-storage:              244910439630
 memory:                         8080948Ki
 pods:                           110

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?:

kubelet --system-reserved and --kube-reserved are supported now on Windows nodes
@feiskyer

This comment has been minimized.

Member

feiskyer commented Oct 18, 2018

/sig windows
/milestone v1.13

/assign @PatrickLang @yujuhong

@neolit123

This comment has been minimized.

Member

neolit123 commented Oct 18, 2018

/retest

1 similar comment
@feiskyer

This comment has been minimized.

Member

feiskyer commented Oct 18, 2018

/retest

@feiskyer

This comment has been minimized.

Member

feiskyer commented Oct 22, 2018

Kindly ping @yujuhong @PatrickLang. Could you help to take a look at the PR?

@PatrickLang

This comment has been minimized.

PatrickLang commented Oct 23, 2018

/lgtm
Still need to do some testing on it though. @yujuhong or @pjh do you want to take a look?

@k8s-ci-robot k8s-ci-robot added the lgtm label Oct 23, 2018

@andyzhangx

This comment has been minimized.

Member

andyzhangx commented Oct 24, 2018

/test pull-kubernetes-cross

@pjh

This comment has been minimized.

pjh commented Oct 24, 2018

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.

@feiskyer

This comment has been minimized.

Member

feiskyer commented Oct 25, 2018

@pjh Thanks.

ping @yujuhong. Could you have a look at this?

@@ -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.

This comment has been minimized.

@yujuhong

yujuhong Oct 30, 2018

Contributor

Hmm...Rename this file to node_container_manager_linux.go

This comment has been minimized.

@feiskyer
// Interface for cadvisor.
cadvisorInterface cadvisor.Interface
// Config of this node.
nodeConfig NodeConfig
}
var _ ContainerManager = &containerManagerImpl{}

This comment has been minimized.

@yujuhong

yujuhong Oct 30, 2018

Contributor

nit: This is redundant.

}
func (cm *containerManagerImpl) InternalContainerLifecycle() InternalContainerLifecycle {
return &internalContainerLifecycleImpl{cpumanager.NewFakeManager()}

This comment has been minimized.

@yujuhong

yujuhong Oct 30, 2018

Contributor

What's the point of returning a fake manager in production?

This comment has been minimized.

@feiskyer

feiskyer Oct 30, 2018

Member

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"

This comment has been minimized.

@yujuhong

yujuhong Oct 30, 2018

Contributor

Please add a paragraph comment in this file explaining the status of this "containermangerImpl" on windows.

This comment has been minimized.

@feiskyer
@yujuhong

This comment has been minimized.

Contributor

yujuhong commented Oct 30, 2018

Looks good overall with some nits.
Will approve once they are addressed (since the PR has already been lgtm'd).

@k8s-ci-robot k8s-ci-robot removed the lgtm label Oct 30, 2018

@feiskyer

This comment has been minimized.

Member

feiskyer commented Oct 30, 2018

@yujuhong Addressed comments. PTAL

@feiskyer

This comment has been minimized.

Member

feiskyer commented Oct 30, 2018

/test pull-kubernetes-local-e2e-containerized

@PatrickLang

This comment has been minimized.

PatrickLang commented Oct 30, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Oct 30, 2018

@yujuhong

This comment has been minimized.

Contributor

yujuhong commented Oct 30, 2018

/approve

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Oct 30, 2018

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 5a8f831 into kubernetes:master Oct 31, 2018

18 checks passed

cla/linuxfoundation feiskyer authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details

@feiskyer feiskyer deleted the feiskyer:win-allocatable branch Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment