Skip to content

Commit

Permalink
do not use default loadbalnacer value
Browse files Browse the repository at this point in the history
  • Loading branch information
rajan2 committed Mar 29, 2023
1 parent 8104398 commit b7292ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/aks/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func createManagedCluster(ctx context.Context, cred *Credentials, workplacesClie
logrus.Warnf("loadBalancerSKU 'basic' is not supported")
networkProfile.LoadBalancerSku = containerservice.Basic
case "":
networkProfile.LoadBalancerSku = containerservice.Standard
networkProfile.LoadBalancerSku = ""
}

virtualNetworkResourceGroup := spec.ResourceGroup
Expand Down
5 changes: 3 additions & 2 deletions pkg/aks/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ var _ = Describe("newManagedCluster", func() {
ID: to.StringPtr("test-workspace-id"),
}, nil)

managedCluster, err := createManagedCluster(ctx, cred, workplacesClientMock, clusterSpec, "test-phase")
clusterSpec.LoadBalancerSKU = to.StringPtr("standard")
managedCluster, err := createManagedCluster(ctx, cred, workplacesClientMock, clusterSpec, "test-phase")
Expect(err).ToNot(HaveOccurred())

Expect(managedCluster.Tags).To(HaveKeyWithValue("test-tag", to.StringPtr("test-value")))
Expect(managedCluster.NetworkProfile.NetworkPolicy).To(Equal(containerservice.NetworkPolicy(to.String(clusterSpec.NetworkPolicy))))
Expect(managedCluster.NetworkProfile.LoadBalancerSku).To(Equal(containerservice.Standard))
Expect(managedCluster.NetworkProfile.LoadBalancerSku).To(Equal(containerservice.LoadBalancerSku(to.String(clusterSpec.LoadBalancerSKU))))
Expect(managedCluster.NetworkProfile.NetworkPlugin).To(Equal(containerservice.NetworkPlugin(to.String(clusterSpec.NetworkPlugin))))
Expect(managedCluster.NetworkProfile.DNSServiceIP).To(Equal(clusterSpec.NetworkDNSServiceIP))
Expect(managedCluster.NetworkProfile.DockerBridgeCidr).To(Equal(clusterSpec.NetworkDockerBridgeCIDR))
Expand Down

0 comments on commit b7292ee

Please sign in to comment.