Skip to content

Commit

Permalink
MTV-1354 | Ignore namespaces when choosing the v2v pod on the nodes
Browse files Browse the repository at this point in the history
Issue: When a user has a plans across many namespaces the v2v
anti-affinity does not look for the other pods in different namespaces
when using the anti-affinity.

Fix: This PR disables the namespace selector so it looks across whole
cluster for the pods and distributes the pods evenly.

Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas committed Sep 2, 2024
1 parent b1a1cca commit 2ae5ea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/plan/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,8 @@ func (r *KubeVirt) guestConversionPod(vm *plan.VMStatus, vmVolumes []cnv.Volume,
{
Weight: 100,
PodAffinityTerm: core.PodAffinityTerm{
TopologyKey: "kubernetes.io/hostname",
NamespaceSelector: &metav1.LabelSelector{},
TopologyKey: "kubernetes.io/hostname",
LabelSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down

0 comments on commit 2ae5ea1

Please sign in to comment.