mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	feat(scheduler): implement node affinity as score plugin
This commit is contained in:
		@@ -140,7 +140,6 @@ func TestSchedulerCreationFromConfigMap(t *testing.T) {
 | 
			
		||||
				"BalancedResourceAllocation",
 | 
			
		||||
				"InterPodAffinityPriority",
 | 
			
		||||
				"LeastRequestedPriority",
 | 
			
		||||
				"NodeAffinityPriority",
 | 
			
		||||
				"SelectorSpreadPriority",
 | 
			
		||||
			),
 | 
			
		||||
			expectedPlugins: map[string][]kubeschedulerconfig.Plugin{
 | 
			
		||||
@@ -152,6 +151,7 @@ func TestSchedulerCreationFromConfigMap(t *testing.T) {
 | 
			
		||||
				},
 | 
			
		||||
				"ScorePlugin": {
 | 
			
		||||
					{Name: "ImageLocality", Weight: 1},
 | 
			
		||||
					{Name: "NodeAffinity", Weight: 1},
 | 
			
		||||
					{Name: "NodePreferAvoidPods", Weight: 10000},
 | 
			
		||||
					{Name: "TaintToleration", Weight: 1},
 | 
			
		||||
				},
 | 
			
		||||
@@ -211,7 +211,6 @@ kind: Policy
 | 
			
		||||
				"BalancedResourceAllocation",
 | 
			
		||||
				"InterPodAffinityPriority",
 | 
			
		||||
				"LeastRequestedPriority",
 | 
			
		||||
				"NodeAffinityPriority",
 | 
			
		||||
				"SelectorSpreadPriority",
 | 
			
		||||
			),
 | 
			
		||||
			expectedPlugins: map[string][]kubeschedulerconfig.Plugin{
 | 
			
		||||
@@ -223,6 +222,7 @@ kind: Policy
 | 
			
		||||
				},
 | 
			
		||||
				"ScorePlugin": {
 | 
			
		||||
					{Name: "ImageLocality", Weight: 1},
 | 
			
		||||
					{Name: "NodeAffinity", Weight: 1},
 | 
			
		||||
					{Name: "NodePreferAvoidPods", Weight: 10000},
 | 
			
		||||
					{Name: "TaintToleration", Weight: 1},
 | 
			
		||||
				},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user