diff --git a/azure/services/aksextensions/spec.go b/azure/services/aksextensions/spec.go index a9ef1feed56..7414820d9bc 100644 --- a/azure/services/aksextensions/spec.go +++ b/azure/services/aksextensions/spec.go @@ -78,12 +78,12 @@ func (s *AKSExtensionSpec) Parameters(ctx context.Context, existingAKSExtension } if s.ExtensionIdentity != "" { aksExtension.Spec.Identity = &asokubernetesconfigurationv1.Identity{ - Type: (*asokubernetesconfigurationv1.Identity_Type)(&s.ExtensionIdentity), + Type: (*asokubernetesconfigurationv1.Identity_Type)(ptr.To(s.ExtensionIdentity)), } } if s.AKSAssignedIdentityType != "" { aksExtension.Spec.AksAssignedIdentity = &asokubernetesconfigurationv1.Extension_Properties_AksAssignedIdentity_Spec{ - Type: (*asokubernetesconfigurationv1.Extension_Properties_AksAssignedIdentity_Type_Spec)(&s.AKSAssignedIdentityType), + Type: (*asokubernetesconfigurationv1.Extension_Properties_AksAssignedIdentity_Type_Spec)(ptr.To(s.AKSAssignedIdentityType)), } } if s.Scope.ScopeType == infrav1.ExtensionScopeCluster { diff --git a/test/e2e/aks_marketplace.go b/test/e2e/aks_marketplace.go index 6e589862223..53e3f94cb53 100644 --- a/test/e2e/aks_marketplace.go +++ b/test/e2e/aks_marketplace.go @@ -137,9 +137,8 @@ func AKSMarketplaceExtensionSpec(ctx context.Context, inputGetter func() AKSMark g.Expect(err).NotTo(HaveOccurred()) infraControlPlane.Spec.MarketplaceExtensions = []infrav1.MarketplaceExtension{ { - Name: extensionName, - ExtensionType: ptr.To("TraefikLabs.TraefikProxy"), - AKSAssignedIdentityType: infrav1.AKSAssignedIdentitySystemAssigned, + Name: extensionName, + ExtensionType: ptr.To("TraefikLabs.TraefikProxy"), Plan: &infrav1.MarketplacePlan{ Name: "traefik-proxy", Product: "traefik-proxy", @@ -165,8 +164,6 @@ func AKSMarketplaceExtensionSpec(ctx context.Context, inputGetter func() AKSMark extension := resp.Extension g.Expect(extension.Properties).NotTo(BeNil()) g.Expect(extension.Name).To(Equal(ptr.To(extensionName))) - g.Expect(extension.Properties.AksAssignedIdentity).NotTo(BeNil()) - g.Expect(extension.Properties.AksAssignedIdentity.Type).To(Equal(ptr.To(armkubernetesconfiguration.AKSIdentityTypeSystemAssigned))) g.Expect(extension.Properties.AutoUpgradeMinorVersion).To(Equal(ptr.To(true))) g.Expect(extension.Properties.ExtensionType).To(Equal(ptr.To("TraefikLabs.TraefikProxy"))) }, input.WaitIntervals...).Should(Succeed())