Azure / Azure/azure-rest-api-specs
AKS: bug in the Node Pools API
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
👋🏻
It appears there's a bug in the Node Pools API in versions 2019-11-01 -> 2020-02-01 (inclusive) - this may be applicable to newer versions of the API too, I'm unable to check at this time.
Previously we were using API version `2019-10-01` for AKS - and using the Node Pools API we were able to set Tags for a Node Pool in upper-case. Upon updating to API version `2019-11-01` (and subsequently `2020-02-01`) - whilst we submit Title Case for the key of the Tags for the Node Pool - the API returns them in lower-case.
When creating/updating a Node Pool for an AKS Cluster - with the following HTTP Request:
```
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ContainerService/managedClusters/tom-devaks999/agentPools/internal?api-version=2020-02-01
{
"properties": {
"count": 1,
"enableAutoScaling": true,
"enableNodePublicIP": false,
"maxCount": 2,
"maxPods": 110,
"minCount": 1,
"orchestratorVersion": "1.15.10",
"osDiskSizeGB": 100,
"osType": "Linux",
"tags": {
"Environment": "Staging"
},
"type": "VirtualMachineScaleSets",
"vmSize": "Standard_DS2_v2"
}
}
```
returns the following HTTP Response:
```
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/example-resources/providers/Microsoft.ContainerService/managedClusters/tom-devaks999/agentPools/internal",
"name": "internal",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"properties": {
"count": 1,
"vmSize": "Standard_DS2_v2",
"osDiskSizeGB": 100,
"maxPods": 110,
"type": "VirtualMachineScaleSets",
"maxCount": 2,
"minCount": 1,
"enableAutoScaling": true,
"provisioningState": "Upgrading",
"orchestratorVersion": "1.15.10",
"enableNodePublicIP": false,
"tags": {
"environment": "Staging"
},
"osType": "Linux"
}
}
```
---
When the Node Pool's been updated - retrieving the Node Pool using the GET endpoint returns:
```
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/example-resources/providers/Microsoft.ContainerService/managedClusters/tom-devaks999/agentPools/internal",
"name": "internal",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"properties": {
"count": 1,
"vmSize": "Standard_DS2_v2",
"osDiskSizeGB": 100,
"maxPods": 110,
"type": "VirtualMachineScaleSets",
"maxCount": 2,
"minCount": 1,
"enableAutoScaling": true,
"provisioningState": "Succeeded",
"orchestratorVersion": "1.15.10",
"enableNodePublicIP": false,
"tags": {
"environment": "Staging"
},
"osType": "Linux"
}
}
```
Note the value for the `tags` block in both resources - upon submitting the key is `Environment` but is returned as `environment`. This occurs for both new Node Pools and when updating existing ones.
Since this is a bug in the AKS Node Pools API (and not something we can work around) - can this be fixed both in the existing API's and the newer versions?
Thanks!
cc @jluk
Contributor guide
Research direction
No repository file, test, or entry point is named. Start by locating the AKS agent pool definitions for API versions 2019-11-01 through 2020-02-01 and compare their tag handling with 2019-10-01; done means the submitted tag key casing is preserved in create, update, and GET responses for the affected versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, kubernetes, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100