Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKS: making the count field optional #7746

Merged
merged 6 commits into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"parameters": {
"api-version": "2019-06-01",
"subscriptionId": "subid1",
"resourceGroupName": "rg1",
"resourceName": "clustername1",
"agentPoolName": "agentpool1",
"parameters": {
"properties": {
"orchestratorVersion": "",
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"name": "agentpool1",
"properties": {
"provisioningState": "Succeeded",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is an example of updating agent pool, the provisioningState in the response could be "Updating", "Upgrading". It cannot be "Succeed"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is copied from the Create/Update response - so I'd suggest if that doesn't match the API definition it'd be worth the service team opening a separate PR for that, since it sounds like the API definition could be out of date?

"orchestratorVersion": "1.9.6",
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"count": 3,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
},
"201": {
"body": {
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"name": "agentpool1",
"properties": {
"provisioningState": "Updating",
"orchestratorVersion": "1.9.6",
"count": 3,
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@
"x-ms-examples": {
"Create/Update Agent Pool": {
"$ref": "./examples/AgentPoolsCreate_Update.json"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to update the json file name? since we separate create and update scenario now if I understand correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are different examples - one covering Create & Update (using a full object) and another covering a Delta Update, where these optional fields aren't specified

In this example the count field is required for a manually scaled cluster (in the Create/Update example) - but cannot be sent for an automatic cluster (in the Update example)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no difference between using full object and delta update in Updating scenario. Using full object, the "count" and "vmsize" is also not a required value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be better to remove the Update in the AgentPoolsCreate_Update.json since it does not applies to Update. But it's out of this PR's scope.

},
"Update Agent Pool": {
"$ref": "./examples/AgentPools_Update.json"
}
}
},
Expand Down Expand Up @@ -1336,10 +1339,7 @@
"count": {
"type": "integer",
"format": "int32",
"maximum": 100,
"minimum": 1,
tombuildsstuff marked this conversation as resolved.
Show resolved Hide resolved
"description": "Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ",
"default": 1
"description": "Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1."
},
"vmSize": {
"$ref": "#/definitions/ContainerServiceVMSize",
Expand Down Expand Up @@ -1416,10 +1416,6 @@
"description": "Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule."
}
},
"required": [
"vmSize",
"count"
],
"description": "Properties for the container service agent pool profile."
},
"ManagedClusterAgentPoolProfile": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"parameters": {
"api-version": "2019-08-01",
"subscriptionId": "subid1",
"resourceGroupName": "rg1",
"resourceName": "clustername1",
"agentPoolName": "agentpool1",
"parameters": {
"properties": {
"orchestratorVersion": "",
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"name": "agentpool1",
"properties": {
"provisioningState": "Succeeded",
"orchestratorVersion": "1.9.6",
"count": 3,
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
},
"201": {
"body": {
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"name": "agentpool1",
"properties": {
"provisioningState": "Updating",
"orchestratorVersion": "1.9.6",
"count": 3,
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@
"x-ms-examples": {
"Create/Update Agent Pool": {
"$ref": "./examples/AgentPoolsCreate_Update.json"
},
"Update Agent Pool": {
"$ref": "./examples/AgentPools_Update.json"
}
}
},
Expand Down Expand Up @@ -1380,10 +1383,7 @@
"count": {
"type": "integer",
"format": "int32",
"maximum": 100,
"minimum": 1,
"description": "Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ",
"default": 1
"description": "Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1."
},
"vmSize": {
"$ref": "#/definitions/ContainerServiceVMSize",
Expand Down Expand Up @@ -1460,10 +1460,6 @@
"description": "Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule."
}
},
"required": [
"vmSize",
"count"
],
"description": "Properties for the container service agent pool profile."
},
"ManagedClusterAgentPoolProfile": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"parameters": {
"api-version": "2019-10-01",
"subscriptionId": "subid1",
"resourceGroupName": "rg1",
"resourceName": "clustername1",
"agentPoolName": "agentpool1",
"parameters": {
"properties": {
"orchestratorVersion": "",
"count": 3,
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"name": "agentpool1",
"properties": {
"provisioningState": "Succeeded",
"orchestratorVersion": "1.9.6",
"count": 3,
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
},
"201": {
"body": {
"id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",
"type": "Microsoft.ContainerService/managedClusters/agentPools",
"name": "agentpool1",
"properties": {
"provisioningState": "Updating",
"orchestratorVersion": "1.9.6",
"count": 3,
"enableAutoScaling": true,
"minCount": 2,
"maxCount": 2,
"vmSize": "Standard_DS1_v2",
"maxPods": 110,
"osType": "Linux",
"nodeTaints": [
"Key1=Value1:NoSchedule"
],
"scaleSetPriority": "Low",
"scaleSetEvictionPolicy": "Delete"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@
"x-ms-examples": {
"Create/Update Agent Pool": {
"$ref": "./examples/AgentPoolsCreate_Update.json"
},
"Update Agent Pool": {
"$ref": "./examples/AgentPools_Update.json"
}
}
},
Expand Down Expand Up @@ -1380,10 +1383,7 @@
"count": {
"type": "integer",
"format": "int32",
"maximum": 100,
"minimum": 1,
"description": "Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ",
"default": 1
"description": "Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1."
},
"vmSize": {
"$ref": "#/definitions/ContainerServiceVMSize",
Expand Down Expand Up @@ -1460,10 +1460,6 @@
"description": "Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule."
}
},
"required": [
"vmSize",
"count"
],
"description": "Properties for the container service agent pool profile."
},
"ManagedClusterAgentPoolProfile": {
Expand Down