From aac3f0f0556607c65d7426acbbf3482f73728a89 Mon Sep 17 00:00:00 2001 From: nolancon Date: Thu, 21 Feb 2019 18:06:10 +0000 Subject: [PATCH] Enable feature gate and kubelet flags for Topology Manager Nit: remove capitalization of preferred Remove line from kubelet and add to separate PR for easier merge nit: dependency added to separate PR Add check to ensure strict policy cannot be set without feature gate enabled Topology Manager runs "none" policy by default. Added constants for policies and updated documentation. Kubernetes-commit: 705f97e171ffaf124d8709c466e42d614e8984b3 --- config/v1beta1/types.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config/v1beta1/types.go b/config/v1beta1/types.go index 54e166f..7bca679 100644 --- a/config/v1beta1/types.go +++ b/config/v1beta1/types.go @@ -54,6 +54,15 @@ const ( // WatchChangeDetectionStrategy is a mode in which kubelet uses // watches to observe changes to objects that are in its interest. WatchChangeDetectionStrategy ResourceChangeDetectionStrategy = "Watch" + // StrictTopologyManagerPolicy is a mode in which kubelet only allows + // pods with NUMA alignment of CPU and device resources. + StrictTopologyManagerPolicy = "strict" + // PreferredTopologyManagerPolicy is a mode in which kubelet will favour + // pods with NUMA alignment of CPU and device resources. + PreferredTopologyManagerPolicy = "preferred" + // NoneTopologyManager Policy is a mode in which kubelet has no knowledge + // of NUMA alignment of a pod's CPU and device resources. + NoneTopologyManagerPolicy = "none" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -409,6 +418,13 @@ type KubeletConfiguration struct { // Default: "10s" // +optional CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"` + // TopologyManagerPolicy is the name of the policy to use. + // Policies other than "none" require the TopologyManager feature gate to be enabled. + // Dynamic Kubelet Config (beta): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. + // Default: "none" + // +optional + TopologyManagerPolicy string `json:"topologyManagerPolicy,omitempty"` // qosReserved is a set of resource name to percentage pairs that specify // the minimum percentage of a resource reserved for exclusive use by the // guaranteed QoS tier.