mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	no need check is nil, because has check before here
This commit is contained in:
		@@ -51,11 +51,9 @@ func CalculateNodePreferAvoidPodsPriorityMap(pod *v1.Pod, meta interface{}, node
 | 
			
		||||
	}
 | 
			
		||||
	for i := range avoids.PreferAvoidPods {
 | 
			
		||||
		avoid := &avoids.PreferAvoidPods[i]
 | 
			
		||||
		if controllerRef != nil {
 | 
			
		||||
		if avoid.PodSignature.PodController.Kind == controllerRef.Kind && avoid.PodSignature.PodController.UID == controllerRef.UID {
 | 
			
		||||
			return schedulerapi.HostPriority{Host: node.Name, Score: 0}, nil
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	}
 | 
			
		||||
	return schedulerapi.HostPriority{Host: node.Name, Score: 10}, nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user