diff --git a/api/v1beta1/azuremanagedcontrolplane_types.go b/api/v1beta1/azuremanagedcontrolplane_types.go index 698cbeb8859..174e5e95573 100644 --- a/api/v1beta1/azuremanagedcontrolplane_types.go +++ b/api/v1beta1/azuremanagedcontrolplane_types.go @@ -442,7 +442,7 @@ type MarketplaceExtension struct { // +optional ConfigurationSettings map[string]string `json:"configurationSettings,omitempty"` - // ExtensionType is the of the Extension, of which this resource is an instance of. + // ExtensionType is the type of the Extension of which this resource is an instance. // It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. ExtensionType *string `json:"extensionType"` @@ -450,7 +450,7 @@ type MarketplaceExtension struct { Plan *MarketplacePlan `json:"plan"` // ReleaseTrain is the release train this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - // only if autoUpgradeMinorVersion is ‘true’. + // This is only used if autoUpgradeMinorVersion is ‘true’. // +optional ReleaseTrain *string `json:"releaseTrain,omitempty"` diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index 718c23582a9..dc7ff48771b 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -1093,18 +1093,18 @@ const ( // MarketplacePlan represents the plan for an AKS marketplace extension. type MarketplacePlan struct { - // Name is the user defined name of the 3rd Party Artifact that is being procured. + // Name is the user-defined name of the 3rd Party Artifact that is being procured. // +optional Name string `json:"name,omitempty"` // Product is the name of the 3rd Party artifact that is being procured. Product string `json:"product"` - // PromotionCode is a publisher provided promotion code as provisioned in Data Market for the said product/artifact. + // PromotionCode is a publisher-provided promotion code as provisioned in Data Market for the said product/artifact. // +optional PromotionCode string `json:"promotionCode,omitempty"` - // Publisher is the name of the publisher of the 3rd Party Artifact that is being bought + // Publisher is the name of the publisher of the 3rd Party Artifact that is being bought. Publisher string `json:"publisher"` // Version is the version of the plan. @@ -1112,23 +1112,23 @@ type MarketplacePlan struct { Version string `json:"version,omitempty"` } -// ExtensionScope defines the scope of the aks marketplace extension, if configured. +// ExtensionScope defines the scope of the AKS marketplace extension, if configured. type ExtensionScope struct { - // ScopeType is the scope of the extension. It can be either Cluster or Namespace; but not both. + // ScopeType is the scope of the extension. It can be either Cluster or Namespace, but not both. ScopeType ExtensionScopeType `json:"scopeType"` - // ReleaseNamespace is the namespace where the extension Release must be placed, for a Cluster scoped extension. - // Required for Cluster scoped extensions. + // ReleaseNamespace is the namespace where the extension Release must be placed, for a Cluster-scoped extension. + // Required for Cluster-scoped extensions. // +optional ReleaseNamespace string `json:"releaseNamespace,omitempty"` - // TargetNamespace is the namespace where the extension will be created for an Namespace scoped extension. - // Required for Namespace scoped extensions. + // TargetNamespace is the namespace where the extension will be created for a Namespace-scoped extension. + // Required for Namespace-scoped extensions. // +optional TargetNamespace string `json:"targetNamespace,omitempty"` } -// ExtensionScopeType defines the scope type of the aks marketplace extension, if configured. +// ExtensionScopeType defines the scope type of the AKS marketplace extension, if configured. // +kubebuilder:validation:Enum=Cluster;Namespace type ExtensionScopeType string @@ -1139,7 +1139,7 @@ const ( ExtensionScopeNamespace ExtensionScopeType = "Namespace" ) -// ExtensionIdentity defines the identity of the aks marketplace extension, if configured. +// ExtensionIdentity defines the identity of the AKS marketplace extension, if configured. // +kubebuilder:validation:Enum=SystemAssigned type ExtensionIdentity string @@ -1148,7 +1148,7 @@ const ( ExtensionIdentitySystemAssigned ExtensionIdentity = "SystemAssigned" ) -// AKSAssignedIdentity defines the AKS assigned identity of the aks marketplace extension, if configured. +// AKSAssignedIdentity defines the AKS assigned-identity of the aks marketplace extension, if configured. // +kubebuilder:validation:Enum=SystemAssigned;UserAssigned type AKSAssignedIdentity string diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml index 594fb0e228a..19cc145e85f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml @@ -413,8 +413,8 @@ spec: for configuring this extension. type: object extensionType: - description: ExtensionType is the of the Extension, of which - this resource is an instance of. It must be one of the Extension + description: ExtensionType is the type of the Extension of which + this resource is an instance. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. type: string @@ -431,7 +431,7 @@ spec: description: Plan is the plan of the extension. properties: name: - description: Name is the user defined name of the 3rd Party + description: Name is the user-defined name of the 3rd Party Artifact that is being procured. type: string product: @@ -439,12 +439,12 @@ spec: that is being procured. type: string promotionCode: - description: PromotionCode is a publisher provided promotion + description: PromotionCode is a publisher-provided promotion code as provisioned in Data Market for the said product/artifact. type: string publisher: description: Publisher is the name of the publisher of the - 3rd Party Artifact that is being bought + 3rd Party Artifact that is being bought. type: string version: description: Version is the version of the plan. @@ -456,27 +456,27 @@ spec: releaseTrain: description: ReleaseTrain is the release train this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is ‘true’. + This is only used if autoUpgradeMinorVersion is ‘true’. type: string scope: description: Scope is the scope at which this extension is enabled. properties: releaseNamespace: description: ReleaseNamespace is the namespace where the - extension Release must be placed, for a Cluster scoped - extension. Required for Cluster scoped extensions. + extension Release must be placed, for a Cluster-scoped + extension. Required for Cluster-scoped extensions. type: string scopeType: description: ScopeType is the scope of the extension. It - can be either Cluster or Namespace; but not both. + can be either Cluster or Namespace, but not both. enum: - Cluster - Namespace type: string targetNamespace: description: TargetNamespace is the namespace where the - extension will be created for an Namespace scoped extension. - Required for Namespace scoped extensions. + extension will be created for a Namespace-scoped extension. + Required for Namespace-scoped extensions. type: string required: - scopeType diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml index 7bd80b63541..e2522406980 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanetemplates.yaml @@ -422,9 +422,9 @@ spec: pairs for configuring this extension. type: object extensionType: - description: ExtensionType is the of the Extension, - of which this resource is an instance of. It must - be one of the Extension Types registered with Microsoft.KubernetesConfiguration + description: ExtensionType is the type of the Extension + of which this resource is an instance. It must be + one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. type: string identity: @@ -440,7 +440,7 @@ spec: description: Plan is the plan of the extension. properties: name: - description: Name is the user defined name of the + description: Name is the user-defined name of the 3rd Party Artifact that is being procured. type: string product: @@ -448,13 +448,13 @@ spec: artifact that is being procured. type: string promotionCode: - description: PromotionCode is a publisher provided + description: PromotionCode is a publisher-provided promotion code as provisioned in Data Market for the said product/artifact. type: string publisher: description: Publisher is the name of the publisher - of the 3rd Party Artifact that is being bought + of the 3rd Party Artifact that is being bought. type: string version: description: Version is the version of the plan. @@ -466,8 +466,8 @@ spec: releaseTrain: description: ReleaseTrain is the release train this extension participates in for auto-upgrade (e.g. Stable, - Preview, etc.) only if autoUpgradeMinorVersion is - ‘true’. + Preview, etc.) This is only used if autoUpgradeMinorVersion + is ‘true’. type: string scope: description: Scope is the scope at which this extension @@ -475,13 +475,12 @@ spec: properties: releaseNamespace: description: ReleaseNamespace is the namespace where - the extension Release must be placed, for a Cluster - scoped extension. Required for Cluster scoped - extensions. + the extension Release must be placed, for a Cluster-scoped + extension. Required for Cluster-scoped extensions. type: string scopeType: description: ScopeType is the scope of the extension. - It can be either Cluster or Namespace; but not + It can be either Cluster or Namespace, but not both. enum: - Cluster @@ -489,9 +488,8 @@ spec: type: string targetNamespace: description: TargetNamespace is the namespace where - the extension will be created for an Namespace - scoped extension. Required for Namespace scoped - extensions. + the extension will be created for a Namespace-scoped + extension. Required for Namespace-scoped extensions. type: string required: - scopeType diff --git a/test/e2e/aks_marketplace.go b/test/e2e/aks_marketplace.go index e8059bed7f8..6e589862223 100644 --- a/test/e2e/aks_marketplace.go +++ b/test/e2e/aks_marketplace.go @@ -38,9 +38,8 @@ import ( ) type AKSMarketplaceExtensionSpecInput struct { - Cluster *clusterv1.Cluster - WaitIntervals []interface{} - WaitExtensionIntervals []interface{} + Cluster *clusterv1.Cluster + WaitIntervals []interface{} } const ( @@ -138,8 +137,9 @@ 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"), + Name: extensionName, + ExtensionType: ptr.To("TraefikLabs.TraefikProxy"), + AKSAssignedIdentityType: infrav1.AKSAssignedIdentitySystemAssigned, Plan: &infrav1.MarketplacePlan{ Name: "traefik-proxy", Product: "traefik-proxy", @@ -148,14 +148,14 @@ func AKSMarketplaceExtensionSpec(ctx context.Context, inputGetter func() AKSMark }, } g.Expect(mgmtClient.Update(ctx, infraControlPlane)).To(Succeed()) - }, input.WaitExtensionIntervals...).Should(Succeed()) + }, input.WaitIntervals...).Should(Succeed()) By("Ensuring the AKS Marketplace Extension status is ready on the AzureManagedControlPlane") Eventually(func(g Gomega) { err = mgmtClient.Get(ctx, client.ObjectKey{Namespace: input.Cluster.Spec.ControlPlaneRef.Namespace, Name: input.Cluster.Spec.ControlPlaneRef.Name}, infraControlPlane) g.Expect(err).NotTo(HaveOccurred()) g.Expect(conditions.IsTrue(infraControlPlane, infrav1.AKSExtensionsReadyCondition)).To(BeTrue()) - }, input.WaitExtensionIntervals...).Should(Succeed()) + }, input.WaitIntervals...).Should(Succeed()) By("Ensuring the AKS Marketplace Extension is added to the AzureManagedControlPlane") Eventually(func(g Gomega) { @@ -164,11 +164,11 @@ func AKSMarketplaceExtensionSpec(ctx context.Context, inputGetter func() AKSMark g.Expect(resp.Properties.ProvisioningState).To(Equal(ptr.To(armkubernetesconfiguration.ProvisioningStateSucceeded))) extension := resp.Extension g.Expect(extension.Properties).NotTo(BeNil()) - g.Expect(extension.Name).To(Equal(extensionName)) + 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("testtestindustryexperiencestest.azurecomps"))) + g.Expect(extension.Properties.ExtensionType).To(Equal(ptr.To("TraefikLabs.TraefikProxy"))) }, input.WaitIntervals...).Should(Succeed()) By("Restoring initial taints for Windows machine pool") diff --git a/test/e2e/azure_test.go b/test/e2e/azure_test.go index 31b19c4f567..dd31bb3a621 100644 --- a/test/e2e/azure_test.go +++ b/test/e2e/azure_test.go @@ -848,9 +848,8 @@ var _ = Describe("Workload cluster creation", func() { By("adding a marketplace extension", func() { AKSMarketplaceExtensionSpec(ctx, func() AKSMarketplaceExtensionSpecInput { return AKSMarketplaceExtensionSpecInput{ - Cluster: result.Cluster, - WaitIntervals: e2eConfig.GetIntervals(specName, "wait-machine-pool-nodes"), - WaitExtensionIntervals: e2eConfig.GetIntervals(specName, "wait-extension"), + Cluster: result.Cluster, + WaitIntervals: e2eConfig.GetIntervals(specName, "wait-machine-pool-nodes"), } }) }) diff --git a/test/e2e/config/azure-dev.yaml b/test/e2e/config/azure-dev.yaml index 37e37a28e72..1b40cdef8a7 100644 --- a/test/e2e/config/azure-dev.yaml +++ b/test/e2e/config/azure-dev.yaml @@ -221,7 +221,6 @@ intervals: default/wait-service: ["15m", "10s"] default/wait-machine-pool-nodes: ["30m", "10s"] default/wait-nsg-update: ["20m", "10s"] - default/wait-extension: ["60m", "10s"] csi-migration/wait-controlplane-upgrade: ["60m", "10s"] csi-migration/wait-worker-nodes: ["60m", "10s"] csi-migration/wait-control-plane: ["60m", "10s"]