Skip to content

Commit 3a682ea

Browse files
committed
Adds cluster-name label to Af/AAF spec
1 parent 984641f commit 3a682ea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/services/vmoperator/vmopmachine.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap
258258
LabelSelector: &metav1.LabelSelector{
259259
MatchLabels: map[string]string{
260260
clusterv1.MachineDeploymentNameLabel: nodePool,
261+
clusterv1.ClusterNameLabel: supervisorMachineCtx.Cluster.Name,
261262
},
262263
},
263264
TopologyKey: corev1.LabelTopologyZone,
@@ -270,12 +271,16 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap
270271
LabelSelector: &metav1.LabelSelector{
271272
MatchLabels: map[string]string{
272273
clusterv1.MachineDeploymentNameLabel: nodePool,
274+
clusterv1.ClusterNameLabel: supervisorMachineCtx.Cluster.Name,
273275
},
274276
},
275277
TopologyKey: corev1.LabelHostname,
276278
},
277279
{
278280
LabelSelector: &metav1.LabelSelector{
281+
MatchLabels: map[string]string{
282+
clusterv1.ClusterNameLabel: supervisorMachineCtx.Cluster.Name,
283+
},
279284
MatchExpressions: []metav1.LabelSelectorRequirement{
280285
{
281286
Key: clusterv1.MachineDeploymentNameLabel,

0 commit comments

Comments
 (0)