diff --git a/cluster-autoscaler/simulator/drain.go b/cluster-autoscaler/simulator/drain.go index 5c030c64cbb7bc1aecb7bbaf5e0f199eb047fea9..9d9838cd5af21a09aff90d39d6b76a16e4cc61a5 100644 --- a/cluster-autoscaler/simulator/drain.go +++ b/cluster-autoscaler/simulator/drain.go @@ -93,7 +93,7 @@ func checkPdbs(pods []*apiv1.Pod, pdbs []*policyv1.PodDisruptionBudget) error { return err } for _, pod := range pods { - if selector.Matches(labels.Set(pod.Labels)) { + if pod.Namespace == pdb.Namespace && selector.Matches(labels.Set(pod.Labels)) { if pdb.Status.PodDisruptionsAllowed < 1 { return fmt.Errorf("no enough pod disruption budget to move %s/%s", pod.Namespace, pod.Name) }