Describe the bug
The value of the availability zone in the generated template file is directly specified and does not use parameters.
Steps To Reproduce
Create a Kubernetes cluster specifying the availability zone.
e.g
"agentPoolProfiles": [
{
"name": "",
"count": 3,
"vmSize": "Standard_D2_v3",
"vnetSubnetId": "",
"availabilityZones": ["1","2", "3"],
}
Generate template using
aks-engine generate kubeconfig.json
Check the template resource section you and search for vmss. Check the availability zine value it will be fixed and not being read from the parameter.
"zones": [
"1",
"2",
"3"
]
Expected behavior
zones value should be read from parameter.
"zones": "[parameters('registryAvailabilityZones')]"
AKS Engine version
Version: v0.53.0
GitCommit: b1655d6cc
GitTreeState: clean
Kubernetes version
1.18
Additional context
Hi @jikuma, thank you for opening this issue and providing a great explanation of the enhancement. Since this is a relatively superficial change to aks-engine, I've added the good first issue and help wanted tags.
Hey @devigned , I'd love to be assigned for this issue. But since it will be my first contribution, assistance will be appreciated. Thanks
The aks-engine team would be delighted to help you contribute. Questions / discussions are easiest to chat about in https://slack.k8s.io #aks-engine-dev.
@jikuma Hi there, just curious: what's the value of the output ARM template referring to the parameter instead of having the values directly? I agree that the current implementation is sloppy, but arguably the cleaner path forward is to just remove this unused parameter entirely. Is there any value keeping this value parameterized?
For example, the three lines in this if statement can be removed:
https://github.com/Azure/aks-engine/blob/master/pkg/engine/params.go#L195
@jackfrancis Yes there is lot of value in keeping the value in parameter. We generate a generic template and deploy the same template in every region using different parameters file. So you see if we fix the value in template file we will not be able to use same template in every region.
@manishram thanks for your help in fixing this issue. Here is my private fix, if it helps https://github.com/Azure/aks-engine/commit/49d0d0e338dbe69aa9e303bacfb51bddc76269fd
@jikuma Thanks, sir. That was so welcoming.
@jikuma that makes sense!
@jikuma Is it the correct format for the commit message?