azure-service-operator
azure-service-operator copied to clipboard
Bug: properties.count is missing when creating auto scaling agent pool
Version of Azure Service Operator
mcr.microsoft.com/k8s/azureserviceoperator:v2.2.0
Describe the bug I'm trying to create the following managed cluster agent pool:
apiVersion: containerservice.azure.com/v1api20230201
kind: ManagedClustersAgentPool
metadata:
name: highmem
namespace: default
annotations:
serviceoperator.azure.com/reconcile-policy: detach-on-delete
spec:
azureName: highmem0
owner:
name: my-cluster
mode: User
enableAutoScaling: true
minCount: 3
maxCount: 21
upgradeSettings:
maxSurge: 33%
vmSize: Standard_E2s_v4
but the reconciliation loops fails with the following error:
--------------------------------------------------------------------------------
RESPONSE 400: 400 Bad Request
ERROR CODE: InvalidParameter
--------------------------------------------------------------------------------
{
"code": "InvalidParameter",
"details": null,
"message": "Required parameter properties.count is missing (null).",
"subcode": "",
"target": "properties.count"
}
--------------------------------------------------------------------------------
on PUT https://management.azure.com/subscriptions/my-sub-id/resourceGroups/my-group/providers/Microsoft.ContainerService/managedClusters/my-cluster/agentPools/highmem0
Workaround
Add count: 1
to the spec
, it will be ignored because the auto-scaling settings will overwrite it but at least will fix the issue.