Update TopologyManager Feature Gate:

- Alpha to Beta.
- True by default.
- Remove redundant validation checks.
This commit is contained in:
nolancon 2020-01-29 07:30:34 +00:00
parent 64ba0bf3d6
commit 1e613e5a4c
2 changed files with 3 additions and 6 deletions

View File

@ -140,6 +140,7 @@ const (
// owner: @lmdaly
// alpha: v1.16
// beta: v1.18
//
// Enable resource managers to make NUMA aligned decisions
TopologyManager featuregate.Feature = "TopologyManager"
@ -557,7 +558,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
AttachVolumeLimit: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19
CPUManager: {Default: true, PreRelease: featuregate.Beta},
CPUCFSQuotaPeriod: {Default: false, PreRelease: featuregate.Alpha},
TopologyManager: {Default: false, PreRelease: featuregate.Alpha},
TopologyManager: {Default: true, PreRelease: featuregate.Beta},
ServiceNodeExclusion: {Default: false, PreRelease: featuregate.Alpha},
NodeDisruptionExclusion: {Default: false, PreRelease: featuregate.Alpha},
CSIDriverRegistry: {Default: true, PreRelease: featuregate.Beta},

View File

@ -53,7 +53,6 @@ func TestValidateKubeletConfiguration(t *testing.T) {
HairpinMode: kubeletconfig.PromiscuousBridge,
NodeLeaseDurationSeconds: 1,
CPUCFSQuotaPeriod: metav1.Duration{Duration: 100 * time.Millisecond},
TopologyManagerPolicy: "none",
}
if allErrors := ValidateKubeletConfiguration(successCase1); allErrors != nil {
t.Errorf("expect no errors, got %v", allErrors)
@ -86,7 +85,6 @@ func TestValidateKubeletConfiguration(t *testing.T) {
HairpinMode: kubeletconfig.PromiscuousBridge,
NodeLeaseDurationSeconds: 1,
CPUCFSQuotaPeriod: metav1.Duration{Duration: 100 * time.Millisecond},
TopologyManagerPolicy: "none",
ReservedSystemCPUs: "0-3",
}
if allErrors := ValidateKubeletConfiguration(successCase2); allErrors != nil {
@ -118,9 +116,8 @@ func TestValidateKubeletConfiguration(t *testing.T) {
HairpinMode: "foo",
NodeLeaseDurationSeconds: -1,
CPUCFSQuotaPeriod: metav1.Duration{Duration: 0},
TopologyManagerPolicy: "",
}
const numErrsErrorCase1 = 26
const numErrsErrorCase1 = 25
if allErrors := ValidateKubeletConfiguration(errorCase1); len(allErrors.(utilerrors.Aggregate).Errors()) != numErrsErrorCase1 {
t.Errorf("expect %d errors, got %v", numErrsErrorCase1, len(allErrors.(utilerrors.Aggregate).Errors()))
}
@ -152,7 +149,6 @@ func TestValidateKubeletConfiguration(t *testing.T) {
HairpinMode: kubeletconfig.PromiscuousBridge,
NodeLeaseDurationSeconds: 1,
CPUCFSQuotaPeriod: metav1.Duration{Duration: 100 * time.Millisecond},
TopologyManagerPolicy: "none",
ReservedSystemCPUs: "0-3",
}
const numErrsErrorCase2 = 1