I have a nodeSelectorTerms that I pass to pod spec to set nodeAffinity. In the other part of my project, I like to list all nodes that match those terms. Is there any solution to this?
I want some thing like this:
nodeList := &corev1.NodeList{}
if err := r.Client.List(context.Background(), nodeList, &client.Selector{config.NodeSelectorTerms}); err != nil {
return nil, err
}
return nodeList, nil