Azure / aksArc

# Welcome to the Azure Kubernetes Service enabled by Azure Arc (AKS Arc) repo This is where the AKS Arc team will track features and issues with AKS Arc. We will monitor this repo in order to engage with our community and discuss questions, customer scenarios, or feature requests. Checkout our projects tab to see the roadmap for AKS Arc!
MIT License
111 stars 45 forks source link

[BUG] Specified LB VM size is ignored when using multiple LB VMs #205

Closed tksh164 closed 1 year ago

tksh164 commented 2 years ago

Describe the bug Specified load balancer VM size in New-AksHciLoadBalancerSetting cmdlet is ignored when using multiple load balancer VMs.

I created a workload cluster with multiple load balancers aligned to the following document steps. However, the load balancer VM size was Standard_A4_v2 (they had 4 vCPUs and 8 GB RAM). The expected VM size was Standard_K8S3_v1 (it has 4 vCPUs and 6 GB RAM).

To Reproduce Follow the following document steps to create a workload cluster with multiple load balancers.

Expected behavior The load balancer VMs was created with Standard_K8S3_v1 size. They have 4 vCPUs and 6 GB RAM.

Screenshots

image

Environment (please complete the following information):

Additional context I believe that this bug comes from the implementation of the Kva module.

In New-KvaClusterInternal cmdlet implementation, $loadBalancerVmSize is set as $global:defaultLoadBalancerVmSize if not specified the VmSize or specified as Default in $loadBalancerSettings. Then generate YAML file using $loadBalancerVmSize.

if (-not $($loadBalancerSettings.VmSize) -or $($loadBalancerSettings.VmSize) -eq 0) {
      $loadBalancerVmSize = $global:defaultLoadBalancerVmSize
}

But if set $loadBalancerSettings.VmSize as non Default, the YAML file generate using $loadBalancerVmSize that passthrough from the loadBalancerVmSize parameter of the New-AksHciCluster cmdlet. If not specified the loadBalancerVmSize parameter on the New-AksHciCluster cmdlet, the parameter value set to $global:defaultLoadBalancerVmSize. It is Standard_A4_v2. This is the bug.

Correctly, $loadBalancerSettings.VmSize should be set to $loadBalancerVmSize if set $loadBalancerSettings.VmSize as non Default.

Collect log files

n/a

tksh164 commented 2 years ago

@madhanrm Is this will fix next the AksHci module release?

tksh164 commented 1 year ago

I tried again with the current latest version (AksHci module: 1.1.43, Kva module: 1.0.36) then the result is the same. The specified LB's VM size was ignored.

tksh164 commented 1 year ago

This issue is fixed at least AksHci module 1.1.67. (It fixed in earlier version, probably)