Controller to not touch osup if possible

This commit is contained in:
2026-04-23 19:05:07 +08:00
parent 9eba55e7ee
commit 4549b9d167
6 changed files with 25 additions and 107 deletions

View File

@@ -276,13 +276,7 @@ func listTargetNodeNames(
if err != nil {
return nil, fmt.Errorf("invalid nodeSelector: %w", err)
}
reqs, selectable := sel.Requirements()
if !selectable {
return nil, fmt.Errorf("nodeSelector is not selectable")
}
selector = selector.Add(reqs...)
selector = sel
}
list, err := clients.Kubernetes.CoreV1().
@@ -306,7 +300,6 @@ func listTargetNodeNames(
}
func shouldUseNode(node *corev1.Node) bool {
// Keep this conservative for now. Tighten if you want only Ready nodes.
return node != nil && node.Name != ""
}