diff --git a/azure/services/managedclusters/spec.go b/azure/services/managedclusters/spec.go index c0ba8520d34..a88c55d5cba 100644 --- a/azure/services/managedclusters/spec.go +++ b/azure/services/managedclusters/spec.go @@ -62,7 +62,7 @@ type ManagedClusterSpec struct { // NetworkPlugin used for building Kubernetes network. Possible values include: 'azure', 'kubenet'. Defaults to azure. NetworkPlugin string - // NetworkPolicy used for building Kubernetes network. Possible values include: 'calico', 'azure'. Defaults to azure. + // NetworkPolicy used for building Kubernetes network. Possible values include: 'calico', 'azure'. NetworkPolicy string // SSHPublicKey is a string literal containing an ssh public key. Will autogenerate and discard if not provided. diff --git a/exp/api/v1beta1/azuremanagedcontrolplane_webhook.go b/exp/api/v1beta1/azuremanagedcontrolplane_webhook.go index 3bd0ec5edc5..6badeb8e133 100644 --- a/exp/api/v1beta1/azuremanagedcontrolplane_webhook.go +++ b/exp/api/v1beta1/azuremanagedcontrolplane_webhook.go @@ -68,10 +68,6 @@ func (m *AzureManagedControlPlane) Default(_ client.Client) { loadBalancerSKU := "Standard" m.Spec.LoadBalancerSKU = &loadBalancerSKU } - if m.Spec.NetworkPolicy == nil { - NetworkPolicy := "calico" - m.Spec.NetworkPolicy = &NetworkPolicy - } if m.Spec.Version != "" && !strings.HasPrefix(m.Spec.Version, "v") { normalizedVersion := "v" + m.Spec.Version diff --git a/exp/api/v1beta1/azuremanagedcontrolplane_webhook_test.go b/exp/api/v1beta1/azuremanagedcontrolplane_webhook_test.go index b27936f5758..0d5ed4210cd 100644 --- a/exp/api/v1beta1/azuremanagedcontrolplane_webhook_test.go +++ b/exp/api/v1beta1/azuremanagedcontrolplane_webhook_test.go @@ -45,7 +45,6 @@ func TestDefaultingWebhook(t *testing.T) { amcp.Default(nil) g.Expect(*amcp.Spec.NetworkPlugin).To(Equal("azure")) g.Expect(*amcp.Spec.LoadBalancerSKU).To(Equal("Standard")) - g.Expect(*amcp.Spec.NetworkPolicy).To(Equal("calico")) g.Expect(amcp.Spec.Version).To(Equal("v1.17.5")) g.Expect(amcp.Spec.SSHPublicKey).NotTo(BeEmpty()) g.Expect(amcp.Spec.NodeResourceGroupName).To(Equal("MC_fooRg_fooName_fooLocation"))