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.
This commit is contained in:
nolancon
2019-02-21 18:06:10 +00:00
parent 5fa7d85c97
commit 705f97e171
11 changed files with 51 additions and 1 deletions

View File

@@ -111,6 +111,9 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error
if kc.ServerTLSBootstrap && !localFeatureGate.Enabled(features.RotateKubeletServerCertificate) {
allErrors = append(allErrors, fmt.Errorf("invalid configuration: ServerTLSBootstrap %v requires feature gate RotateKubeletServerCertificate", kc.ServerTLSBootstrap))
}
if kc.TopologyManagerPolicy != kubeletconfig.NoneTopologyManagerPolicy && !localFeatureGate.Enabled(features.TopologyManager) {
allErrors = append(allErrors, fmt.Errorf("invalid configuration: TopologyManager %v requires feature gate TopologyManager", kc.TopologyManagerPolicy))
}
for _, val := range kc.EnforceNodeAllocatable {
switch val {
case kubetypes.NodeAllocatableEnforcementKey: