mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #91258 from alculquicondor/double_spread_weight
Set weight of PodTopologySpread Score to 2
This commit is contained in:
commit
7ba332a839
@ -189,7 +189,7 @@ profiles:
|
||||
{Name: "NodePreferAvoidPods", Weight: 10000},
|
||||
{Name: "DefaultPodTopologySpread", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 2},
|
||||
},
|
||||
"BindPlugin": {{Name: "DefaultBinder"}},
|
||||
"ReservePlugin": {{Name: "VolumeBinding"}},
|
||||
@ -320,7 +320,7 @@ profiles:
|
||||
{Name: "NodePreferAvoidPods", Weight: 10000},
|
||||
{Name: "DefaultPodTopologySpread", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 2},
|
||||
},
|
||||
"BindPlugin": {{Name: "DefaultBinder"}},
|
||||
"ReservePlugin": {{Name: "VolumeBinding"}},
|
||||
|
@ -172,7 +172,10 @@ func applyFeatureGates(config *schedulerapi.Plugins) {
|
||||
config.PreFilter.Enabled = append(config.PreFilter.Enabled, f)
|
||||
config.Filter.Enabled = append(config.Filter.Enabled, f)
|
||||
config.PreScore.Enabled = append(config.PreScore.Enabled, f)
|
||||
s := schedulerapi.Plugin{Name: podtopologyspread.Name, Weight: 1}
|
||||
// Weight is doubled because:
|
||||
// - This is a score coming from user preference.
|
||||
// - It makes its signal comparable to NodeResourcesLeastAllocated.
|
||||
s := schedulerapi.Plugin{Name: podtopologyspread.Name, Weight: 2}
|
||||
config.Score.Enabled = append(config.Score.Enabled, s)
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ func TestClusterAutoscalerProvider(t *testing.T) {
|
||||
{Name: nodepreferavoidpods.Name, Weight: 10000},
|
||||
{Name: defaultpodtopologyspread.Name, Weight: 1},
|
||||
{Name: tainttoleration.Name, Weight: 1},
|
||||
{Name: podtopologyspread.Name, Weight: 1},
|
||||
{Name: podtopologyspread.Name, Weight: 2},
|
||||
},
|
||||
},
|
||||
Reserve: &schedulerapi.PluginSet{
|
||||
@ -274,7 +274,7 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
{Name: nodepreferavoidpods.Name, Weight: 10000},
|
||||
{Name: defaultpodtopologyspread.Name, Weight: 1},
|
||||
{Name: tainttoleration.Name, Weight: 1},
|
||||
{Name: podtopologyspread.Name, Weight: 1},
|
||||
{Name: podtopologyspread.Name, Weight: 2},
|
||||
{Name: noderesources.ResourceLimitsName, Weight: 1},
|
||||
},
|
||||
},
|
||||
|
@ -1452,7 +1452,7 @@ func TestAlgorithmProviderCompatibility(t *testing.T) {
|
||||
{Name: "NodePreferAvoidPods", Weight: 10000},
|
||||
{Name: "DefaultPodTopologySpread", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 2},
|
||||
},
|
||||
"BindPlugin": {{Name: "DefaultBinder"}},
|
||||
"ReservePlugin": {{Name: "VolumeBinding"}},
|
||||
@ -1520,7 +1520,7 @@ func TestAlgorithmProviderCompatibility(t *testing.T) {
|
||||
{Name: "NodePreferAvoidPods", Weight: 10000},
|
||||
{Name: "DefaultPodTopologySpread", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 2},
|
||||
},
|
||||
"ReservePlugin": {{Name: "VolumeBinding"}},
|
||||
"UnreservePlugin": {{Name: "VolumeBinding"}},
|
||||
@ -1608,7 +1608,7 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
|
||||
{Name: "NodePreferAvoidPods", Weight: 10000},
|
||||
{Name: "DefaultPodTopologySpread", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 1},
|
||||
{Name: "PodTopologySpread", Weight: 2},
|
||||
},
|
||||
"ReservePlugin": {{Name: "VolumeBinding"}},
|
||||
"UnreservePlugin": {{Name: "VolumeBinding"}},
|
||||
|
Loading…
Reference in New Issue
Block a user