1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Merge pull request #366 from lixiang233/podAntiAffinity_add_missing_validation

Add missing validation in PodAntiAffinity
This commit is contained in:
Kubernetes Prow Robot
2020-07-30 07:34:31 -07:00
committed by GitHub

View File

@@ -46,6 +46,10 @@ func validateRemovePodsViolatingInterPodAntiAffinityParams(params *api.StrategyP
// RemovePodsViolatingInterPodAntiAffinity evicts pods on the node which are having a pod affinity rules.
func RemovePodsViolatingInterPodAntiAffinity(ctx context.Context, client clientset.Interface, strategy api.DeschedulerStrategy, nodes []*v1.Node, podEvictor *evictions.PodEvictor) {
if err := validateRemovePodsViolatingInterPodAntiAffinityParams(strategy.Params); err != nil {
klog.V(1).Info(err)
return
}
var namespaces api.Namespaces
if strategy.Params != nil {
namespaces = strategy.Params.Namespaces