Graduate DefaultPodTopologySpread to beta

And set to enabled by default

Change-Id: Ie4cc4758c52492924cb0663450f2747908cb5882
This commit is contained in:
Aldo Culquicondor
2020-10-15 20:29:42 -04:00
parent c71519e53d
commit 87c8349bdc
13 changed files with 150 additions and 193 deletions

View File

@@ -121,7 +121,6 @@ func TestAppendPriorityConfigs(t *testing.T) {
Enabled: []config.Plugin{
{Name: podtopologyspread.Name},
{Name: interpodaffinity.Name},
{Name: selectorspread.Name},
{Name: tainttoleration.Name},
},
},
@@ -134,17 +133,21 @@ func TestAppendPriorityConfigs(t *testing.T) {
{Name: noderesources.LeastAllocatedName, Weight: 1},
{Name: nodeaffinity.Name, Weight: 1},
{Name: nodepreferavoidpods.Name, Weight: 10000},
{Name: selectorspread.Name, Weight: 1},
{Name: tainttoleration.Name, Weight: 1},
},
},
},
wantPluginConfig: []config.PluginConfig{
{
Name: podtopologyspread.Name,
Args: &config.PodTopologySpreadArgs{
DefaultingType: config.SystemDefaulting,
},
},
},
},
{
name: "DefaultPodTopologySpread enabled, SelectorSpreadPriority only",
features: map[featuregate.Feature]bool{
features.DefaultPodTopologySpread: true,
},
keys: map[string]int64{
SelectorSpreadPriority: 3,
},
@@ -171,9 +174,6 @@ func TestAppendPriorityConfigs(t *testing.T) {
},
{
name: "DefaultPodTopologySpread enabled, EvenPodsSpreadPriority only",
features: map[featuregate.Feature]bool{
features.DefaultPodTopologySpread: true,
},
keys: map[string]int64{
EvenPodsSpreadPriority: 4,
},
@@ -199,9 +199,9 @@ func TestAppendPriorityConfigs(t *testing.T) {
},
},
{
name: "DefaultPodTopologySpread enabled, SelectorSpreadPriority+EvenPodsSpreadPriority",
name: "DefaultPodTopologySpread disabled, SelectorSpreadPriority+EvenPodsSpreadPriority",
features: map[featuregate.Feature]bool{
features.DefaultPodTopologySpread: true,
features.DefaultPodTopologySpread: false,
},
keys: map[string]int64{
SelectorSpreadPriority: 1,
@@ -211,19 +211,13 @@ func TestAppendPriorityConfigs(t *testing.T) {
PreScore: &config.PluginSet{
Enabled: []config.Plugin{
{Name: podtopologyspread.Name},
{Name: selectorspread.Name},
},
},
Score: &config.PluginSet{
Enabled: []config.Plugin{
{Name: podtopologyspread.Name, Weight: 2},
},
},
},
wantPluginConfig: []config.PluginConfig{
{
Name: podtopologyspread.Name,
Args: &config.PodTopologySpreadArgs{
DefaultingType: config.SystemDefaulting,
{Name: selectorspread.Name, Weight: 1},
},
},
},