From 004af41751392477bb4dd3be5626967266e58a76 Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 17:07:25 -0800 Subject: [PATCH 1/8] allow edit taints and add test --- src/aks-preview/azext_aks_preview/_params.py | 1 + src/aks-preview/azext_aks_preview/custom.py | 5 +- .../test_aks_nodepool_update_taints_msi.yaml | 1307 +++++++++++++++++ .../tests/latest/test_aks_commands.py | 76 + 4 files changed, 1387 insertions(+), 2 deletions(-) create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_update_taints_msi.yaml diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index ba34b2abb42..2f215dcaf48 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -282,6 +282,7 @@ def load_arguments(self, _): c.argument('mode', arg_type=get_enum_type([CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER])) c.argument('max_surge', type=str, validator=validate_max_surge) c.argument('labels', nargs='*', validator=validate_nodepool_labels) + c.argument('node_taints', type=str, validator=validate_taints) with self.argument_context('aks addon show') as c: c.argument('addon', options_list=['--addon', '-a'], validator=validate_addon) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 97cb2e756c7..5691ee6f3dc 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1767,16 +1767,17 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument max_surge=None, mode=None, labels=None, + node_taints=None, no_wait=False): update_autoscaler = enable_cluster_autoscaler + \ disable_cluster_autoscaler + update_cluster_autoscaler - if (update_autoscaler != 1 and not tags and not scale_down_mode and not mode and not max_surge and labels is None): + if (update_autoscaler != 1 and not tags and not scale_down_mode and not mode and not max_surge and labels is None and node_taints is None): raise CLIError('Please specify one or more of "--enable-cluster-autoscaler" or ' '"--disable-cluster-autoscaler" or ' '"--update-cluster-autoscaler" or ' - '"--tags" or "--mode" or "--max-surge" or "--scale-down-mode" or "--labels"') + '"--tags" or "--mode" or "--max-surge" or "--scale-down-mode" or "--labels" or "--node-taints') instance = client.get(resource_group_name, cluster_name, nodepool_name) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_update_taints_msi.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_update_taints_msi.yaml new file mode 100644 index 00000000000..e6f83b56581 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_update_taints_msi.yaml @@ -0,0 +1,1307 @@ +interactions: +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliaksdns000002", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "workloadRuntime": "OCIContainer", + "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCYjiOAmfMwVuIAE31nCYs7f3ygC/sIwuNTchhXbeuMgnBngX9/ytGfyDPtJcHeAWGAWJqXDvlQ1zKcqvkEcEbrRioF6s6KrihUEbZp/QqspPRMkCLxl+11LcUkxDiErzX3oc9Wa9YiKEZIq4E2nOASLya8SVFWl3rQWaHsXe07JiH7AE9Gf6GaJsjn+coQ3yE12u6kpbduPWLSTdEiAeFKvM/jrUtLWVyxli0jvgZjU+y/VJuQJlhqZcHKeK0xG8JD8lgryv2Fu4esrxw2YqSJGySoE4Fm+BMe3wsydbf3cbzj7mI6WAMbA0aFS6atge+Cn4tuOWa3BYa2XIKOYXhl + azcli_aks_live_test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": + "standard"}, "disableLocalAccounts": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1400' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.21.7\",\n \"currentKubernetesVersion\": \"1.21.7\",\n \"dnsPrefix\": + \"cliaksdns000002\",\n \"fqdn\": \"cliaksdns000002-ef4ec800.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliaksdns000002-ef4ec800.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.21.7\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQCYjiOAmfMwVuIAE31nCYs7f3ygC/sIwuNTchhXbeuMgnBngX9/ytGfyDPtJcHeAWGAWJqXDvlQ1zKcqvkEcEbrRioF6s6KrihUEbZp/QqspPRMkCLxl+11LcUkxDiErzX3oc9Wa9YiKEZIq4E2nOASLya8SVFWl3rQWaHsXe07JiH7AE9Gf6GaJsjn+coQ3yE12u6kpbduPWLSTdEiAeFKvM/jrUtLWVyxli0jvgZjU+y/VJuQJlhqZcHKeK0xG8JD8lgryv2Fu4esrxw2YqSJGySoE4Fm+BMe3wsydbf3cbzj7mI6WAMbA0aFS6atge+Cn4tuOWa3BYa2XIKOYXhl + azcli_aks_live_test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\",\n \"podCidrs\": [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": + [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n + \ },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": false,\n \"oidcIssuerProfile\": + {\n \"enabled\": false\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n + \ \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\": + \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2967' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:14:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1189' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:14:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:15:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:15:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:16:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:16:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:17:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:17:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/62f2c87e-b860-4a60-8363-32b3040cfc66?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"7ec8f262-60b8-604a-8363-32b3040cfc66\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-12-28T09:14:00.64Z\",\n \"endTime\": + \"2021-12-28T09:17:56.692253Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '164' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --dns-name-prefix --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.21.7\",\n \"currentKubernetesVersion\": \"1.21.7\",\n \"dnsPrefix\": + \"cliaksdns000002\",\n \"fqdn\": \"cliaksdns000002-ef4ec800.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliaksdns000002-ef4ec800.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.21.7\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQCYjiOAmfMwVuIAE31nCYs7f3ygC/sIwuNTchhXbeuMgnBngX9/ytGfyDPtJcHeAWGAWJqXDvlQ1zKcqvkEcEbrRioF6s6KrihUEbZp/QqspPRMkCLxl+11LcUkxDiErzX3oc9Wa9YiKEZIq4E2nOASLya8SVFWl3rQWaHsXe07JiH7AE9Gf6GaJsjn+coQ3yE12u6kpbduPWLSTdEiAeFKvM/jrUtLWVyxli0jvgZjU+y/VJuQJlhqZcHKeK0xG8JD8lgryv2Fu4esrxw2YqSJGySoE4Fm+BMe3wsydbf3cbzj7mI6WAMbA0aFS6atge+Cn4tuOWa3BYa2XIKOYXhl + azcli_aks_live_test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/766f51a5-8e32-4392-9c21-5c3b926e7c15\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\": + [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n + \ ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"oidcIssuerProfile\": + {\n \"enabled\": false\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n + \ \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\": + \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3620' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.21.7\",\n \"currentKubernetesVersion\": \"1.21.7\",\n \"dnsPrefix\": + \"cliaksdns000002\",\n \"fqdn\": \"cliaksdns000002-ef4ec800.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliaksdns000002-ef4ec800.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.21.7\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQCYjiOAmfMwVuIAE31nCYs7f3ygC/sIwuNTchhXbeuMgnBngX9/ytGfyDPtJcHeAWGAWJqXDvlQ1zKcqvkEcEbrRioF6s6KrihUEbZp/QqspPRMkCLxl+11LcUkxDiErzX3oc9Wa9YiKEZIq4E2nOASLya8SVFWl3rQWaHsXe07JiH7AE9Gf6GaJsjn+coQ3yE12u6kpbduPWLSTdEiAeFKvM/jrUtLWVyxli0jvgZjU+y/VJuQJlhqZcHKeK0xG8JD8lgryv2Fu4esrxw2YqSJGySoE4Fm+BMe3wsydbf3cbzj7mI6WAMbA0aFS6atge+Cn4tuOWa3BYa2XIKOYXhl + azcli_aks_live_test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/766f51a5-8e32-4392-9c21-5c3b926e7c15\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\": + [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n + \ ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"oidcIssuerProfile\": + {\n \"enabled\": false\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n + \ \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\": + \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3620' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks get-credentials + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --file + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/listClusterUserCredential?api-version=2021-11-01-preview + response: + body: + string: "{\n \"kubeconfigs\": [\n {\n \"name\": \"clusterUser\",\n \"value\": + \"YXBpVmVyc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DlUTldST1dFTTFRazVyVVROV2JYcGxkelI2YzBGblJHSmpUMnB2Ym5WdWJqZ0tMUzB0TFMxRlRrUWdVbE5CSUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLCiAgICB0b2tlbjogMmFhMWU5MWM1ZDU3ZjFjNWFjMDM0NDgxNDg4ZjRhNTNkMDE3NDViZmUzYjRkYzM1MmIzNDBhNzlmYmFjM2YzMTk4OGQ3NmI3Y2MwMDUyZjgwZGUxNDNlYjZiMWQ2OTVmYTdkMDk5ZTY1MzAxNWUyN2E2NmM0NjZlZDQ3NDU1MjAK\"\n + \ }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '13072' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n + \ \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"enableFIPS\": + false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '922' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 128, "osDiskType": "Managed", "kubeletDiskType": "OS", "workloadRuntime": "OCIContainer", + "maxPods": 110, "osType": "Linux", "osSKU": "Ubuntu", "enableAutoScaling": false, + "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "1.21.7", "upgradeSettings": {}, "powerState": {"code": "Running"}, "enableNodePublicIP": + false, "nodeTaints": ["key1=value1:NoSchedule"], "enableEncryptionAtHost": false, + "enableUltraSSD": false, "enableFIPS": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + Content-Length: + - '533' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \"key1=value1:NoSchedule\"\n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6e4fc177-fe67-467f-8d8a-42ee58256f48?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '995' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1193' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6e4fc177-fe67-467f-8d8a-42ee58256f48?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"77c14f6e-67fe-7f46-8d8a-42ee58256f48\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-12-28T09:18:05.0466666Z\",\n \"endTime\": + \"2021-12-28T09:18:10.3840683Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \"key1=value1:NoSchedule\"\n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '996' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools?api-version=2021-11-01-preview + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \"key1=value1:NoSchedule\"\n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '1085' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \"key1=value1:NoSchedule\"\n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '996' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 128, "osDiskType": "Managed", "kubeletDiskType": "OS", "workloadRuntime": "OCIContainer", + "maxPods": 110, "osType": "Linux", "osSKU": "Ubuntu", "enableAutoScaling": false, + "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "1.21.7", "upgradeSettings": {}, "powerState": {"code": "Running"}, "enableNodePublicIP": + false, "nodeTaints": [], "enableEncryptionAtHost": false, + "enableUltraSSD": false, "enableFIPS": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + Content-Length: + - '533' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2c00c2c6-97fa-4328-89c3-70b9be1d7115?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '995' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:18:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1193' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2c00c2c6-97fa-4328-89c3-70b9be1d7115?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"c6c2002c-fa97-2843-89c3-70b9be1d7115\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-12-28T09:18:38.44Z\",\n \"endTime\": + \"2021-12-28T09:18:46.9811027Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:19:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-taints + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '996' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:19:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name + User-Agent: + - AZURECLI/2.31.0 azsdk-python-azure-mgmt-containerservice/16.5.0 Python/3.8.11 + (Linux-5.11.0-1022-azure-x86_64-with-glibc2.27) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1?api-version=2021-11-01-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/agentPools/nodepool1\",\n + \ \"name\": \"nodepool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.21.7\",\n \"enableNodePublicIP\": + false,\n \"nodeTaints\": [\n \n ],\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.12.07\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '996' + content-type: + - application/json + date: + - Tue, 28 Dec 2021 09:19:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index a8e2b717fbd..1397b5cb71b 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3122,6 +3122,82 @@ def test_aks_update_with_windows_gmsa(self, resource_group, resource_group_locat self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + nodepool1_name = "nodepool1" + nodepool2_name = "nodepool2" + taints = "key1=value1:NoSchedule" + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'dns_name_prefix': self.create_random_name('cliaksdns', 16), + 'ssh_key_value': self.generate_ssh_keys(), + 'location': resource_group_location, + 'resource_type': 'Microsoft.ContainerService/ManagedClusters', + 'taints': taints, + 'nodepool1_name': nodepool1_name, + 'nodepool2_name': nodepool2_name, + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' + self.cmd(create_cmd, checks=[ + self.exists('fqdn'), + self.exists('nodeResourceGroup'), + self.check('provisioningState', 'Succeeded') + ]) + + # show + self.cmd('aks show -g {resource_group} -n {name}', checks=[ + self.check('type', '{resource_type}'), + self.check('name', '{name}'), + self.exists('nodeResourceGroup'), + self.check('resourceGroup', '{resource_group}'), + self.check('agentPoolProfiles[0].count', 1), + self.check('agentPoolProfiles[0].osType', 'Linux'), + self.check('agentPoolProfiles[0].vmSize', 'Standard_DS2_v2'), + self.check('agentPoolProfiles[0].mode', 'System'), + self.check('dnsPrefix', '{dns_name_prefix}'), + self.exists('kubernetesVersion') + ]) + + # get-credentials + fd, temp_path = tempfile.mkstemp() + self.kwargs.update({'file': temp_path}) + try: + self.cmd( + 'aks get-credentials -g {resource_group} -n {name} --file "{file}"') + self.assertGreater(os.path.getsize(temp_path), 0) + finally: + os.close(fd) + os.remove(temp_path) + + # nodepool update nodepool1 taints + self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints {taints}', checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + # nodepool list + self.cmd('aks nodepool list --resource-group={resource_group} --cluster-name={name}', checks=[ + self.check('[0].mode', 'System'), + self.check('[0].node_taints[0]', 'key1=value1:NoSchedule'), + ]) + + # nodepool delete nodepool1 label + update_nodepool = self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ') + assert len(update_nodepool["node_taints"]) == 0 + + # nodepool show + show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}') + assert len(show_nodepool["node_taints"]) == 0 + + @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') From 2241212c33a4e18f1306316408b0179546444984 Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 17:19:36 -0800 Subject: [PATCH 2/8] add missing parameter --- src/aks-preview/azext_aks_preview/_help.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 080dd932bea..60dc58867c8 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1100,6 +1100,9 @@ - name: --labels type: string short-summary: The node labels for the node pool. See https://aka.ms/node-labels for syntax of labels. + - name: --node-taints + type: string + short-summary: The node taints for the node pool. You can't change the node taints through CLI after the node pool is created. examples: - name: Enable cluster-autoscaler within node count range [1,5] text: az aks nodepool update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster From fec7d88efbf0e8ef5ba5b1576fde28c899bfeb32 Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 17:29:03 -0800 Subject: [PATCH 3/8] change var name --- .../azext_aks_preview/tests/latest/test_aks_commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 1397b5cb71b..9a44e93d815 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3186,16 +3186,16 @@ def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_loc # nodepool list self.cmd('aks nodepool list --resource-group={resource_group} --cluster-name={name}', checks=[ self.check('[0].mode', 'System'), - self.check('[0].node_taints[0]', 'key1=value1:NoSchedule'), + self.check('[0].nodeTaints[0]', 'key1=value1:NoSchedule'), ]) # nodepool delete nodepool1 label update_nodepool = self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ') - assert len(update_nodepool["node_taints"]) == 0 + assert len(update_nodepool["nodeTaints"]) == 0 # nodepool show show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}') - assert len(show_nodepool["node_taints"]) == 0 + assert len(show_nodepool["nodeTaints"]) == 0 From 8c0f46087cd63d891706d9c70ffa813938bd3d5f Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 19:25:15 -0800 Subject: [PATCH 4/8] .get_output_in_json() --- .../azext_aks_preview/tests/latest/test_aks_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 9a44e93d815..bcc54cc19fe 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3190,11 +3190,11 @@ def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_loc ]) # nodepool delete nodepool1 label - update_nodepool = self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ') + update_nodepool = self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ').get_output_in_json() assert len(update_nodepool["nodeTaints"]) == 0 # nodepool show - show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}') + show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}').get_output_in_json() assert len(show_nodepool["nodeTaints"]) == 0 From ab09b2833b1c9faa22a7898accae895270ac1a5b Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 19:46:32 -0800 Subject: [PATCH 5/8] give value --- src/aks-preview/azext_aks_preview/custom.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 5691ee6f3dc..1f050ca6551 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1781,6 +1781,18 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument instance = client.get(resource_group_name, cluster_name, nodepool_name) + taints_array = [] + + if node_taints is not None: + for taint in node_taints.split(','): + try: + taint = taint.strip() + taints_array.append(taint) + except ValueError: + raise CLIError( + 'Taint does not match allowed values. Expect value such as "special=true:NoSchedule".') + instance.node_taints=taints_array + if min_count is None or max_count is None: if enable_cluster_autoscaler or update_cluster_autoscaler: raise CLIError('Please specify both min-count and max-count when --enable-cluster-autoscaler or ' From 172d80f7a81f71f9d30ab8447088497653a7a627 Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 20:24:03 -0800 Subject: [PATCH 6/8] try fix' --- src/aks-preview/azext_aks_preview/_help.py | 4 ++-- src/aks-preview/azext_aks_preview/custom.py | 5 ++--- .../azext_aks_preview/tests/latest/test_aks_commands.py | 9 ++------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 60dc58867c8..f44cdd3d40d 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -977,7 +977,7 @@ short-summary: "Describes how VMs are added to or removed from nodepools." - name: --node-taints type: string - short-summary: The node taints for the node pool. You can't change the node taints through CLI after the node pool is created. + short-summary: The node taints for the node pool. - name: --priority type: string short-summary: The priority of the node pool. @@ -1102,7 +1102,7 @@ short-summary: The node labels for the node pool. See https://aka.ms/node-labels for syntax of labels. - name: --node-taints type: string - short-summary: The node taints for the node pool. You can't change the node taints through CLI after the node pool is created. + short-summary: The node taints for the node pool. examples: - name: Enable cluster-autoscaler within node count range [1,5] text: az aks nodepool update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 1f050ca6551..57c7f910d3d 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1781,9 +1781,8 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument instance = client.get(resource_group_name, cluster_name, nodepool_name) - taints_array = [] - if node_taints is not None: + taints_array = [] for taint in node_taints.split(','): try: taint = taint.strip() @@ -1791,7 +1790,7 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument except ValueError: raise CLIError( 'Taint does not match allowed values. Expect value such as "special=true:NoSchedule".') - instance.node_taints=taints_array + instance.node_taints = taints_array if min_count is None or max_count is None: if enable_cluster_autoscaler or update_cluster_autoscaler: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index bcc54cc19fe..e4a7be6554f 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3130,7 +3130,6 @@ def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_loc # kwargs for string formatting aks_name = self.create_random_name('cliakstest', 16) nodepool1_name = "nodepool1" - nodepool2_name = "nodepool2" taints = "key1=value1:NoSchedule" self.kwargs.update({ 'resource_group': resource_group, @@ -3141,7 +3140,6 @@ def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_loc 'resource_type': 'Microsoft.ContainerService/ManagedClusters', 'taints': taints, 'nodepool1_name': nodepool1_name, - 'nodepool2_name': nodepool2_name, }) # create @@ -3190,15 +3188,12 @@ def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_loc ]) # nodepool delete nodepool1 label - update_nodepool = self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ').get_output_in_json() - assert len(update_nodepool["nodeTaints"]) == 0 + self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints ') # nodepool show - show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}').get_output_in_json() + show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} -o json').get_output_in_json() assert len(show_nodepool["nodeTaints"]) == 0 - - @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') def test_aks_nodepool_update_label_msi(self, resource_group, resource_group_location): From f6cc53a61ebace3fe94382acaa104c7f95a4031f Mon Sep 17 00:00:00 2001 From: xinywa Date: Wed, 26 Jan 2022 21:25:28 -0800 Subject: [PATCH 7/8] fix test --- src/aks-preview/azext_aks_preview/custom.py | 15 ++++++++------- .../tests/latest/test_aks_commands.py | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 57c7f910d3d..809ac1de1ba 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1783,13 +1783,14 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument if node_taints is not None: taints_array = [] - for taint in node_taints.split(','): - try: - taint = taint.strip() - taints_array.append(taint) - except ValueError: - raise CLIError( - 'Taint does not match allowed values. Expect value such as "special=true:NoSchedule".') + if node_taints != '': + for taint in node_taints.split(','): + try: + taint = taint.strip() + taints_array.append(taint) + except ValueError: + raise CLIError( + 'Taint does not match allowed values. Expect value such as "special=true:NoSchedule".') instance.node_taints = taints_array if min_count is None or max_count is None: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index e4a7be6554f..f93c08c2a81 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3188,7 +3188,7 @@ def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_loc ]) # nodepool delete nodepool1 label - self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints ') + self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints "" ') # nodepool show show_nodepool = self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} -o json').get_output_in_json() From 0bac52a255a6761c339c0384c227fbf80c3b651a Mon Sep 17 00:00:00 2001 From: xinywa Date: Mon, 31 Jan 2022 20:23:15 -0800 Subject: [PATCH 8/8] address comments --- src/aks-preview/azext_aks_preview/_params.py | 4 ++-- src/aks-preview/azext_aks_preview/custom.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 2f215dcaf48..5cb705c9776 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -244,7 +244,7 @@ def load_arguments(self, _): c.argument('enable_fips_image', action='store_true') c.argument('enable_cluster_autoscaler', options_list=["--enable-cluster-autoscaler", "-e"], action='store_true') c.argument('scale_down_mode', arg_type=get_enum_type([CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE])) - c.argument('node_taints', type=str, validator=validate_taints) + c.argument('node_taints', validator=validate_taints) c.argument('priority', arg_type=get_enum_type([CONST_SCALE_SET_PRIORITY_REGULAR, CONST_SCALE_SET_PRIORITY_SPOT]), validator=validate_priority) c.argument('eviction_policy', arg_type=get_enum_type([CONST_SPOT_EVICTION_POLICY_DELETE, CONST_SPOT_EVICTION_POLICY_DEALLOCATE]), validator=validate_eviction_policy) c.argument('spot_max_price', type=float, validator=validate_spot_max_price) @@ -282,7 +282,7 @@ def load_arguments(self, _): c.argument('mode', arg_type=get_enum_type([CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER])) c.argument('max_surge', type=str, validator=validate_max_surge) c.argument('labels', nargs='*', validator=validate_nodepool_labels) - c.argument('node_taints', type=str, validator=validate_taints) + c.argument('node_taints', validator=validate_taints) with self.argument_context('aks addon show') as c: c.argument('addon', options_list=['--addon', '-a'], validator=validate_addon) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 809ac1de1ba..7f369847aa7 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1789,7 +1789,7 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument taint = taint.strip() taints_array.append(taint) except ValueError: - raise CLIError( + raise InvalidArgumentValueError( 'Taint does not match allowed values. Expect value such as "special=true:NoSchedule".') instance.node_taints = taints_array