mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Disabled CheckNodeMemoryPressure and CheckNodeDiskPressure predicates if TaintNodesByCondition enabled.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
This commit is contained in:
@@ -179,12 +179,17 @@ func defaultPredicates() sets.String {
|
||||
// ApplyFeatureGates applies algorithm by feature gates.
|
||||
func ApplyFeatureGates() {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.TaintNodesByCondition) {
|
||||
// Remove "CheckNodeCondition" predicate
|
||||
// Remove "CheckNodeCondition", "CheckNodeMemoryPressure" and "CheckNodeDiskPressure" predicates
|
||||
factory.RemoveFitPredicate(predicates.CheckNodeConditionPred)
|
||||
// Remove Key "CheckNodeCondition" From All Algorithm Provider
|
||||
factory.RemoveFitPredicate(predicates.CheckNodeMemoryPressurePred)
|
||||
factory.RemoveFitPredicate(predicates.CheckNodeDiskPressurePred)
|
||||
// Remove key "CheckNodeCondition", "CheckNodeMemoryPressure" and "CheckNodeDiskPressure"
|
||||
// from ALL algorithm provider
|
||||
// The key will be removed from all providers which in algorithmProviderMap[]
|
||||
// if you just want remove specific provider, call func RemovePredicateKeyFromAlgoProvider()
|
||||
factory.RemovePredicateKeyFromAlgorithmProviderMap(predicates.CheckNodeConditionPred)
|
||||
factory.RemovePredicateKeyFromAlgorithmProviderMap(predicates.CheckNodeMemoryPressurePred)
|
||||
factory.RemovePredicateKeyFromAlgorithmProviderMap(predicates.CheckNodeDiskPressurePred)
|
||||
|
||||
// Fit is determined based on whether a pod can tolerate all of the node's taints
|
||||
factory.RegisterMandatoryFitPredicate(predicates.PodToleratesNodeTaintsPred, predicates.PodToleratesNodeTaints)
|
||||
|
||||
Reference in New Issue
Block a user