Skip to content

Commit

Permalink
Merge pull request #2999 from jackfrancis/aks-default-networkPolicy
Browse files Browse the repository at this point in the history
don’t default to AKS networkPolicy=calico
  • Loading branch information
k8s-ci-robot authored Jan 10, 2023
2 parents 6d4750c + 058a6e0 commit baaa53e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion azure/services/managedclusters/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions exp/api/v1beta1/azuremanagedcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion exp/api/v1beta1/azuremanagedcontrolplane_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit baaa53e

Please sign in to comment.