@@ -41,7 +41,6 @@ import (
41
41
"github.com/openshift/machine-api-provider-azure/pkg/cloud/azure/services/networkinterfaces"
42
42
"github.com/openshift/machine-api-provider-azure/pkg/cloud/azure/services/publicips"
43
43
"github.com/openshift/machine-api-provider-azure/pkg/cloud/azure/services/resourceskus"
44
- "github.com/openshift/machine-api-provider-azure/pkg/cloud/azure/services/virtualmachineextensions"
45
44
"github.com/openshift/machine-api-provider-azure/pkg/cloud/azure/services/virtualmachines"
46
45
apicorev1 "k8s.io/api/core/v1"
47
46
apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -93,7 +92,6 @@ func NewReconciler(scope *actuators.MachineScope) *Reconciler {
93
92
interfaceLoadBalancersSvc : interfaceloadbalancers .NewService (scope ),
94
93
networkInterfacesSvc : networkinterfaces .NewService (scope ),
95
94
virtualMachinesSvc : virtualmachines .NewService (scope ),
96
- virtualMachinesExtSvc : virtualmachineextensions .NewService (scope ),
97
95
publicIPSvc : publicips .NewService (scope ),
98
96
disksSvc : disks .NewService (scope ),
99
97
availabilitySetsSvc : availabilitysets .NewService (scope ),
@@ -436,22 +434,6 @@ func (s *Reconciler) Exists(ctx context.Context) (bool, error) {
436
434
return false , fmt .Errorf ("returned incorrect vm interface: %v" , err )
437
435
}
438
436
439
- if s .scope .MachineConfig .UserDataSecret == nil {
440
- vmExtSpec := & virtualmachineextensions.Spec {
441
- Name : "startupScript" ,
442
- VMName : s .scope .Name (),
443
- }
444
-
445
- vmExt , err := s .virtualMachinesExtSvc .Get (ctx , vmExtSpec )
446
- if err != nil && vmExt == nil {
447
- return false , nil
448
- }
449
-
450
- if err != nil {
451
- return false , fmt .Errorf ("failed to get vm extension: %w" , err )
452
- }
453
- }
454
-
455
437
switch machinev1 .AzureVMState (* vm .ProvisioningState ) {
456
438
case machinev1 .VMStateDeleting :
457
439
return true , fmt .Errorf ("vm for machine %s has unexpected 'Deleting' provisioning state" , s .scope .Machine .GetName ())
0 commit comments