diff --git a/pkg/actuators/machine/actuator.go b/pkg/actuators/machine/actuator.go index 7c6cbdb14f..12a9ca0af8 100644 --- a/pkg/actuators/machine/actuator.go +++ b/pkg/actuators/machine/actuator.go @@ -575,5 +575,9 @@ func (a *Actuator) updateStatus(machine *machinev1.Machine, instance *ec2.Instan func getClusterID(machine *machinev1.Machine) (string, bool) { clusterID, ok := machine.Labels[providerconfigv1.ClusterIDLabel] + // NOTE: This block can be removed after the label renaming transition to machine.openshift.io + if !ok { + clusterID, ok = machine.Labels["sigs.k8s.io/cluster-api-cluster"] + } return clusterID, ok } diff --git a/test/e2e/provider_expectations.go b/test/e2e/provider_expectations.go index cc472dcdb6..e64ff4f9b3 100644 --- a/test/e2e/provider_expectations.go +++ b/test/e2e/provider_expectations.go @@ -140,7 +140,7 @@ func (tc *testConfig) ExpectNewNodeWhenDeletingMachine() error { var triagedWorkerNode corev1.Node MachineLoop: for _, m := range machineList.Items { - if m.Labels["machine.openshift.io/cluster-api-machine-role"] == "worker" { + if m.Labels["machine.openshift.io/cluster-api-machine-role"] == "worker" || m.Labels["sigs.k8s.io/cluster-api-machine-role"] == "worker" { for _, n := range nodeList.Items { if m.Status.NodeRef == nil { glog.Errorf("no NodeRef found in machine %v", m.Name) @@ -217,7 +217,7 @@ func (tc *testConfig) ExpectNodeToBeDrainedBeforeDeletingMachine() error { } for _, machineItem := range machineList.Items { // empty or non-worker role skipped - if machineItem.Labels["machine.openshift.io/cluster-api-machine-role"] == "worker" { + if machineItem.Labels["machine.openshift.io/cluster-api-machine-role"] == "worker" || machineItem.Labels["sigs.k8s.io/cluster-api-machine-role"] == "worker" { if machineItem.Status.NodeRef != nil && machineItem.Status.NodeRef.Name != "" { machine = machineItem nodeName = machineItem.Status.NodeRef.Name