diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 20746d1bfc7..db1210450df 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ +0.5.79 +++++++ + +* Add support for KEDA workload auto-scaler. * Fix `az aks addon list`, `az aks addon list-available` and `az aks addon show` commands when dealing with the web application routing addon. * Update to use 2022-05-02-preview api version. diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 7aa25e7b3ef..6d3631c4868 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -447,6 +447,9 @@ - name: --enable-custom-ca-trust type: bool short-summary: Enable Custom CA Trust on agent node pool. + - name: --enable-keda + type: bool + short-summary: Enable KEDA workload auto-scaler. examples: - name: Create a Kubernetes cluster with an existing SSH public key. text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey @@ -761,6 +764,12 @@ - name: --apiserver-subnet-id type: string short-summary: The ID of a subnet in an existing VNet into which to assign control plane apiserver pods(requires --enable-apiserver-vnet-integration) + - name: --enable-keda + type: bool + short-summary: Enable KEDA workload auto-scaler. + - name: --disable-keda + type: bool + short-summary: Disable KEDA workload auto-scaler. examples: - name: Reconcile the cluster back to its current state. text: az aks update -g MyResourceGroup -n MyManagedCluster diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 2ff86664c90..215c949558b 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -306,6 +306,7 @@ def load_arguments(self, _): c.argument('dns-zone-resource-id') # no validation for aks create because it already only supports Linux. c.argument('enable_custom_ca_trust', action='store_true') + c.argument('enable_keda', action='store_true', is_preview=True) with self.argument_context('aks update') as c: # managed cluster paramerters @@ -380,6 +381,8 @@ def load_arguments(self, _): c.argument('azure_keyvault_kms_key_id', validator=validate_azure_keyvault_kms_key_id, is_preview=True) c.argument('enable_apiserver_vnet_integration', action='store_true', is_preview=True) c.argument('apiserver_subnet_id', validator=validate_apiserver_subnet_id, is_preview=True) + c.argument('enable_keda', action='store_true', is_preview=True) + c.argument('disable_keda', action='store_true', is_preview=True) with self.argument_context('aks scale') as c: c.argument('nodepool_name', diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 776d57b0826..233683003bd 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -819,6 +819,7 @@ def aks_create(cmd, apiserver_subnet_id=None, dns_zone_resource_id=None, enable_custom_ca_trust=False, + enable_keda=False, yes=False): # DO NOT MOVE: get all the original parameters and save them as a dictionary raw_parameters = locals() @@ -911,6 +912,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, azure_keyvault_kms_key_id=None, enable_apiserver_vnet_integration=False, apiserver_subnet_id=None, + enable_keda=False, + disable_keda=False, ): # DO NOT MOVE: get all the original parameters and save them as a dictionary raw_parameters = locals() diff --git a/src/aks-preview/azext_aks_preview/decorator.py b/src/aks-preview/azext_aks_preview/decorator.py index a585d997d91..cc84a4f887d 100644 --- a/src/aks-preview/azext_aks_preview/decorator.py +++ b/src/aks-preview/azext_aks_preview/decorator.py @@ -99,6 +99,8 @@ AzureKeyVaultKms = TypeVar('AzureKeyVaultKms') ManagedClusterIngressProfile = TypeVar('ManagedClusterIngressProfile') ManagedClusterIngressProfileWebAppRouting = TypeVar('ManagedClusterIngressProfileWebAppRouting') +ManagedClusterWorkloadAutoScalerProfile = TypeVar('ManagedClusterWorkloadAutoScalerProfile') +ManagedClusterWorkloadAutoScalerProfileKeda = TypeVar('ManagedClusterWorkloadAutoScalerProfileKeda') # pylint: disable=too-many-instance-attributes,too-few-public-methods @@ -186,6 +188,16 @@ def __init__(self, cmd: AzCommandsLoader, resource_type: ResourceType): resource_type=self.resource_type, operation_group="managed_clusters", ) + self.ManagedClusterWorkloadAutoScalerProfile = self.__cmd.get_models( + "ManagedClusterWorkloadAutoScalerProfile", + resource_type=self.resource_type, + operation_group="managed_clusters", + ) + self.ManagedClusterWorkloadAutoScalerProfileKeda = self.__cmd.get_models( + "ManagedClusterWorkloadAutoScalerProfileKeda", + resource_type=self.resource_type, + operation_group="managed_clusters", + ) # holder for nat gateway related models self.__nat_gateway_models = None # holder for pod identity related models @@ -2141,6 +2153,76 @@ def get_apiserver_subnet_id(self) -> Union[str, None]: """ return self._get_apiserver_subnet_id(enable_validation=True) + def _get_enable_keda(self, enable_validation: bool = False) -> bool: + """Internal function to obtain the value of enable_keda. + + This function supports the option of enable_validation. When enabled, if both enable_keda and disable_keda are + specified, raise a MutuallyExclusiveArgumentError. + + :return: bool + """ + # Read the original value passed by the command. + enable_keda = self.raw_param.get("enable_keda") + + # In create mode, try to read the property value corresponding to the parameter from the `mc` object. + if self.decorator_mode == DecoratorMode.CREATE: + if ( + self.mc and + self.mc.workload_auto_scaler_profile and + self.mc.workload_auto_scaler_profile.keda + ): + enable_keda = self.mc.workload_auto_scaler_profile.keda.enabled + + # This parameter does not need dynamic completion. + if enable_validation: + if enable_keda and self._get_disable_keda(enable_validation=False): + raise MutuallyExclusiveArgumentError( + "Cannot specify --enable-keda and --disable-keda at the same time." + ) + + return enable_keda + + def get_enable_keda(self) -> bool: + """Obtain the value of enable_keda. + + This function will verify the parameter by default. If both enable_keda and disable_keda are specified, raise a + MutuallyExclusiveArgumentError. + + :return: bool + """ + return self._get_enable_keda(enable_validation=True) + + def _get_disable_keda(self, enable_validation: bool = False) -> bool: + """Internal function to obtain the value of disable_keda. + + This function supports the option of enable_validation. When enabled, if both enable_keda and disable_keda are + specified, raise a MutuallyExclusiveArgumentError. + + :return: bool + """ + # Read the original value passed by the command. + disable_keda = self.raw_param.get("disable_keda") + + # This option is not supported in create mode, hence we do not read the property value from the `mc` object. + # This parameter does not need dynamic completion. + if enable_validation: + if disable_keda and self._get_enable_keda(enable_validation=False): + raise MutuallyExclusiveArgumentError( + "Cannot specify --enable-keda and --disable-keda at the same time." + ) + + return disable_keda + + def get_disable_keda(self) -> bool: + """Obtain the value of disable_keda. + + This function will verify the parameter by default. If both enable_keda and disable_keda are specified, raise a + MutuallyExclusiveArgumentError. + + :return: bool + """ + return self._get_disable_keda(enable_validation=True) + class AKSPreviewCreateDecorator(AKSCreateDecorator): # pylint: disable=super-init-not-called @@ -2558,6 +2640,21 @@ def set_up_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster return mc + def set_up_workload_auto_scaler_profile(self, mc: ManagedCluster) -> ManagedCluster: + """Set up workload auto-scaler profile for the ManagedCluster object. + + :return: the ManagedCluster object + """ + if not isinstance(mc, self.models.ManagedCluster): + raise CLIInternalError(f"Unexpected mc object with type '{type(mc)}'.") + + if self.context.get_enable_keda(): + if mc.workload_auto_scaler_profile is None: + mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() + mc.workload_auto_scaler_profile.keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) + + return mc + def construct_mc_preview_profile(self) -> ManagedCluster: """The overall controller used to construct the preview ManagedCluster profile. @@ -2590,6 +2687,8 @@ def construct_mc_preview_profile(self) -> ManagedCluster: mc = self.set_up_storage_profile(mc) + mc = self.set_up_workload_auto_scaler_profile(mc) + return mc def create_mc_preview(self, mc: ManagedCluster) -> ManagedCluster: @@ -2742,7 +2841,7 @@ def check_raw_parameters(self): '"--disable-local-accounts" or ' '"--enable-public-fqdn" or ' '"--disable-public-fqdn"' - '"--enble-windows-gmsa" or ' + '"--enable-windows-gmsa" or ' '"--nodepool-labels" or ' '"--enable-oidc-issuer" or ' '"--http-proxy-config" or ' @@ -2755,7 +2854,9 @@ def check_raw_parameters(self): '"--disable-snapshot-controller" or ' '"--enable-azure-keyvault-kms" or ' '"--enable-workload-identity" or ' - '"--disable-workload-identity".' + '"--disable-workload-identity" or ' + '"--enable-keda" or ' + '"--disable-keda".' ) def update_load_balancer_profile(self, mc: ManagedCluster) -> ManagedCluster: @@ -2980,6 +3081,25 @@ def update_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster return mc + def update_workload_auto_scaler_profile(self, mc: ManagedCluster) -> ManagedCluster: + """Update workload auto-scaler profile for the ManagedCluster object. + + :return: the ManagedCluster object + """ + self._ensure_mc(mc) + + if self.context.get_enable_keda(): + if mc.workload_auto_scaler_profile is None: + mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() + mc.workload_auto_scaler_profile.keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) + + if self.context.get_disable_keda(): + if mc.workload_auto_scaler_profile is None: + mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() + mc.workload_auto_scaler_profile.keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False) + + return mc + def patch_mc(self, mc: ManagedCluster) -> ManagedCluster: """Helper function to patch the ManagedCluster object. @@ -3027,6 +3147,8 @@ def update_mc_preview_profile(self) -> ManagedCluster: mc = self.update_storage_profile(mc) + mc = self.update_workload_auto_scaler_profile(mc) + return mc def update_mc_preview(self, mc: ManagedCluster) -> ManagedCluster: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_keda.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_keda.yaml new file mode 100644 index 00000000000..5da7d441e14 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_keda.yaml @@ -0,0 +1,710 @@ +interactions: +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitesthl66gx2ki-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "enableCustomCATrust": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": + false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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, "storageProfile": {}, "workloadAutoScalerProfile": + {"keda": {"enabled": true}}}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1529' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitesthl66gx2ki-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthl66gx2ki-8ecadf-290bfce2.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitesthl66gx2ki-8ecadf-290bfce2.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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 \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + true\n }\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/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3352' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:28:44 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: + - '1191' + status: + code: 201 + message: Created +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:29:14 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:29:45 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:30:15 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:30:45 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:31:15 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:31:44 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:32:15 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:32:45 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ec0250b8-2e32-4585-94ae-1aee1c30bab0?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"b85002ec-322e-8545-94ae-1aee1c30bab0\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-28T10:28:44.7466666Z\",\n \"endTime\": + \"2022-05-28T10:32:46.8403199Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:33:14 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output --aks-custom-headers + --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitesthl66gx2ki-8ecadf\",\n \"fqdn\": \"cliakstest-clitesthl66gx2ki-8ecadf-290bfce2.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitesthl66gx2ki-8ecadf-290bfce2.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/c6d9af86-980d-49a9-8e69-f90a31d8e3c4\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + true\n }\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: + - '4005' + content-type: + - application/json + date: + - Sat, 28 May 2022 10:33:15 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 delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --yes --no-wait + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d0edce8e-daf8-40f4-a990-a0c3085416a5?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Sat, 28 May 2022 10:33:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/d0edce8e-daf8-40f4-a990-a0c3085416a5?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_with_keda.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_with_keda.yaml new file mode 100644 index 00000000000..c37a4784be8 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_with_keda.yaml @@ -0,0 +1,1618 @@ +interactions: +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitests3ejjijh7-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "enableCustomCATrust": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": + false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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, "storageProfile": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1471' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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 \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\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/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3271' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:14:25 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: + - '1195' + 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:14:55 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:15:25 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:15:55 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:16:25 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:16:55 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:17:25 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:17:55 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:18:26 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:18:56 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9736d34a-49e8-4288-b516-409abbc9702c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"4ad33697-e849-8842-b516-409abbc9702c\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-28T11:14:25.4466666Z\",\n \"endTime\": + \"2022-05-28T11:19:03.3288954Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:19:26 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 --ssh-key-value --output + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\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: + - '3924' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:19:26 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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --aks-custom-headers --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\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: + - '3924' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:19:27 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: '{"location": "westus2", "sku": {"name": "Basic", "tier": "Free"}, "identity": + {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.22.6", "dnsPrefix": + "cliakstest-clitests3ejjijh7-8ecadf", "agentPoolProfiles": [{"count": 3, "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.22.6", "powerState": {"code": "Running"}, + "enableNodePublicIP": false, "enableCustomCATrust": false, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + azcli_aks_live_test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "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", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1, "countIPv6": 0}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167"}]}, + "podCidrs": ["10.244.0.0/16"], "serviceCidrs": ["10.0.0.0/16"], "ipFamilies": + ["IPv4"]}, "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}, + "disableLocalAccounts": false, "securityProfile": {}, "storageProfile": {}, + "workloadAutoScalerProfile": {"keda": {"enabled": true}}}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2560' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --yes --output --aks-custom-headers --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + true\n }\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/a8b45fc8-9a56-4a34-bea0-c3b014550b5f?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '4003' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:19:29 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: + - '1185' + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --aks-custom-headers --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8b45fc8-9a56-4a34-bea0-c3b014550b5f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"c85fb4a8-569a-344a-bea0-c3b014550b5f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:19:29.8766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:19:59 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --aks-custom-headers --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8b45fc8-9a56-4a34-bea0-c3b014550b5f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"c85fb4a8-569a-344a-bea0-c3b014550b5f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:19:29.8766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:20:29 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --aks-custom-headers --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8b45fc8-9a56-4a34-bea0-c3b014550b5f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"c85fb4a8-569a-344a-bea0-c3b014550b5f\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-28T11:19:29.8766666Z\",\n \"endTime\": + \"2022-05-28T11:20:49.2770005Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:20:59 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: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/AKS-KedaPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --aks-custom-headers --enable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + true\n }\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: + - '4005' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:20:59 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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --disable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + true\n }\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: + - '4005' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:21: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: '{"location": "westus2", "sku": {"name": "Basic", "tier": "Free"}, "identity": + {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.22.6", "dnsPrefix": + "cliakstest-clitests3ejjijh7-8ecadf", "agentPoolProfiles": [{"count": 3, "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.22.6", "powerState": {"code": "Running"}, + "enableNodePublicIP": false, "enableCustomCATrust": false, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + azcli_aks_live_test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "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", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1, "countIPv6": 0}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167"}]}, + "podCidrs": ["10.244.0.0/16"], "serviceCidrs": ["10.0.0.0/16"], "ipFamilies": + ["IPv4"]}, "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}, + "disableLocalAccounts": false, "securityProfile": {}, "storageProfile": {}, + "workloadAutoScalerProfile": {"keda": {"enabled": false}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2561' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --yes --output --disable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + false\n }\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/994d00d0-a03f-4eab-9240-159fd0553de5?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '4004' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:21:03 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: + - '1191' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --disable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/994d00d0-a03f-4eab-9240-159fd0553de5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d0004d99-3fa0-ab4e-9240-159fd0553de5\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:21:03.3666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:21:32 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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --disable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/994d00d0-a03f-4eab-9240-159fd0553de5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d0004d99-3fa0-ab4e-9240-159fd0553de5\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-28T11:21:03.3666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:22: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --disable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/994d00d0-a03f-4eab-9240-159fd0553de5?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d0004d99-3fa0-ab4e-9240-159fd0553de5\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-28T11:21:03.3666666Z\",\n \"endTime\": + \"2022-05-28T11:22:12.511551Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '169' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:22:33 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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --yes --output --disable-keda + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.22.6\",\n \"currentKubernetesVersion\": \"1.22.6\",\n \"dnsPrefix\": + \"cliakstest-clitests3ejjijh7-8ecadf\",\n \"fqdn\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitests3ejjijh7-8ecadf-34fedced.portal.hcp.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 3,\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.22.6\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2022.05.10\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRkw8KP2RIp1ujBO6aBLwtQO/uX1OLEKzEontBdOXolRLKKXKO2fi7mAnfGnQAqs9efvTPNnPFyQ5YA/RRT7yTaXAvEfBAGzD8blP6fhzcDVmtszVGW4uD8xqF32nshWA8T+y6KsnF7Ipbwo4a7JR/EKLPOMbhmDdLW0Yyte4rFWhha0scVs+BuMJNSjGq6gzop+kQc3zgn0dgLhtfLp46xYlLvxnoV+de5IqrWcVj8ClSdQKP29LWvjhQ4+Atl//pM0TylSTcSHEH1Nrg/nsudt9z+l/nKpnviA2ShCI0QKnECCLO39KqPKL4EEqWJsCS326pGhDKjYG4pZPghwnH + 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_cliakstest000002_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_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/48a040b2-361b-41f8-8d82-4a24b735d167\"\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_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {\n \"keda\": {\n \"enabled\": + false\n }\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: + - '4006' + content-type: + - application/json + date: + - Sat, 28 May 2022 11:22:34 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 delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --yes --no-wait + User-Agent: + - AZURECLI/2.37.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.8.10 + (Linux-5.13.0-1023-azure-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ea9d367c-4a4e-4307-a4ba-e9ba4009590d?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Sat, 28 May 2022 11:22:34 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/ea9d367c-4a4e-4307-a4ba-e9ba4009590d?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +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 767d84baa29..3d243391f2d 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 @@ -4364,6 +4364,73 @@ def test_aks_disable_addon_web_app_routing(self, resource_group, resource_group_ # self.check('ingressProfile.webAppRouting.enabled', False) ]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_keda(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys(), + }) + + # create: enable-keda + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --output=json ' \ + '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-KedaPreview ' \ + '--enable-keda' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('workloadAutoScalerProfile.keda.enabled', True), + ]) + + # delete + delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' + self.cmd(delete_cmd, checks=[ + self.is_empty(), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_update_with_keda(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys(), + }) + + # create: without enable-keda + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --output=json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.not_exists('workloadAutoScalerProfile.keda'), + ]) + + # update: enable-keda + update_cmd = 'aks update --resource-group={resource_group} --name={name} --yes --output=json ' \ + '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-KedaPreview ' \ + '--enable-keda' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('workloadAutoScalerProfile.keda.enabled', True), + ]) + + # update: disable-keda + update_cmd = 'aks update --resource-group={resource_group} --name={name} --yes --output=json ' \ + '--disable-keda' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('workloadAutoScalerProfile.keda.enabled', False), + ]) + + # delete + cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' + self.cmd(cmd, checks=[ + self.is_empty(), + ]) + @live_only() # live only is required for test environment setup like `az login` @AllowLargeResponse() def test_list_trustedaccess_roles(self): diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py index 42df5854c75..0404307fa46 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py @@ -114,6 +114,17 @@ def test_models(self): getattr(module, "ManagedClusterPodIdentityException"), ) + # workload auto-scaler profile models + self.assertEqual( + models.ManagedClusterWorkloadAutoScalerProfile, + getattr(module, "ManagedClusterWorkloadAutoScalerProfile") + ) + + self.assertEqual( + models.ManagedClusterWorkloadAutoScalerProfileKeda, + getattr(module, "ManagedClusterWorkloadAutoScalerProfileKeda") + ) + class AKSPreviewContextTestCase(unittest.TestCase): def setUp(self): @@ -2678,6 +2689,87 @@ def test_get_apiserver_subnet_id(self): with self.assertRaises(RequiredArgumentMissingError): ctx_6.get_apiserver_subnet_id() + def test_get_enable_keda(self): + # Returns the value of enable_keda if keda is None in existing profile. + ctx = AKSPreviewContext(self.cmd, {}, self.models, decorator_mode=DecoratorMode.CREATE) + self.assertIsNone(ctx.get_enable_keda()) + + ctx = AKSPreviewContext(self.cmd, {"enable_keda": False}, self.models, decorator_mode=DecoratorMode.CREATE) + self.assertFalse(ctx.get_enable_keda()) + + ctx = AKSPreviewContext(self.cmd, {"enable_keda": True}, self.models, decorator_mode=DecoratorMode.CREATE) + self.assertTrue(ctx.get_enable_keda()) + + keda_none_mc = self.models.ManagedCluster( + location="test_location", + workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile()) + + keda_false_mc = self.models.ManagedCluster( + location="test_location", + workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile( + keda=self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False))) + + keda_true_mc = self.models.ManagedCluster( + location="test_location", + workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile( + keda=self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True))) + + # Returns the value of keda in existing profile if enable_keda is None. + ctx = AKSPreviewContext(self.cmd, {}, self.models, decorator_mode=DecoratorMode.CREATE) + ctx.attach_mc(keda_none_mc) + self.assertIsNone(ctx.get_enable_keda()) + + ctx = AKSPreviewContext(self.cmd, {}, self.models, decorator_mode=DecoratorMode.CREATE) + ctx.attach_mc(keda_false_mc) + self.assertFalse(ctx.get_enable_keda()) + + ctx = AKSPreviewContext(self.cmd, {}, self.models, decorator_mode=DecoratorMode.CREATE) + ctx.attach_mc(keda_true_mc) + self.assertTrue(ctx.get_enable_keda()) + + # Ignores the value of keda in existing profile in update-mode. + ctx = AKSPreviewContext(self.cmd, {}, self.models, decorator_mode=DecoratorMode.UPDATE) + ctx.attach_mc(keda_true_mc) + self.assertIsNone(ctx.get_enable_keda()) + + # Throws exception when both enable_keda and disable_keda are True. + ctx = AKSPreviewContext(self.cmd, {"enable_keda": True, "disable_keda": True}, self.models, decorator_mode=DecoratorMode.CREATE) + with self.assertRaises(MutuallyExclusiveArgumentError): + ctx.get_enable_keda() + + # Throws exception when disable_keda and the value of keda in existing profile are True. + ctx = AKSPreviewContext(self.cmd, {"disable_keda": True}, self.models, decorator_mode=DecoratorMode.CREATE) + ctx.attach_mc(keda_true_mc) + with self.assertRaises(MutuallyExclusiveArgumentError): + ctx.get_enable_keda() + + def test_get_disable_keda(self): + # Returns the value of disable_keda. + ctx = AKSPreviewContext(self.cmd, {}, self.models, decorator_mode=DecoratorMode.CREATE) + self.assertIsNone(ctx.get_disable_keda()) + + ctx = AKSPreviewContext(self.cmd, {"disable_keda": False}, self.models, decorator_mode=DecoratorMode.CREATE) + self.assertFalse(ctx.get_disable_keda()) + + ctx = AKSPreviewContext(self.cmd, {"disable_keda": True}, self.models, decorator_mode=DecoratorMode.CREATE) + self.assertTrue(ctx.get_disable_keda()) + + # Throws exception when both enable_keda and disable_keda are True. + ctx = AKSPreviewContext(self.cmd, {"enable_keda": True, "disable_keda": True}, self.models, decorator_mode=DecoratorMode.CREATE) + with self.assertRaises(MutuallyExclusiveArgumentError): + ctx.get_disable_keda() + + keda_true_mc = self.models.ManagedCluster( + location="test_location", + workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile( + keda=self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True))) + + # Throws exception when disable_keda and the value of keda in existing profile are True. + ctx = AKSPreviewContext(self.cmd, {"disable_keda": True}, self.models, decorator_mode=DecoratorMode.CREATE) + ctx.attach_mc(keda_true_mc) + with self.assertRaises(MutuallyExclusiveArgumentError): + ctx.get_disable_keda() + class AKSPreviewCreateDecoratorTestCase(unittest.TestCase): def setUp(self): @@ -3702,8 +3794,6 @@ def test_set_up_api_server_access_profile(self): location="test_location", api_server_access_profile=ground_truth_api_server_access_profile_2, ) - print(dec_mc_2.api_server_access_profile) - print(ground_truth_api_server_access_profile_2) self.assertEqual(dec_mc_2, ground_truth_mc_2) def test_set_up_creationdata_of_cluster_snapshot(self): @@ -3724,6 +3814,35 @@ def test_set_up_creationdata_of_cluster_snapshot(self): location="test_location", creation_data=cd) self.assertEqual(dec_mc_1, ground_truth_mc_1) + def test_set_up_workload_auto_scaler_profile(self): + # Throws exception when incorrect mc object is passed. + dec = AKSPreviewCreateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + with self.assertRaisesRegex(CLIInternalError, "^Unexpected mc object with type ''\.$"): + dec.set_up_workload_auto_scaler_profile(None) + + # Sets profile to None without raw parameters. + dec = AKSPreviewCreateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + mc_out = dec.set_up_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertIsNone(mc_out.workload_auto_scaler_profile) + + # Sets profile to None if enable_keda is False. + dec = AKSPreviewCreateDecorator(self.cmd, self.client, {"enable_keda": False}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + mc_out = dec.set_up_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertIsNone(mc_out.workload_auto_scaler_profile) + + # Sets profile with keda enabled if enable_keda is True. + dec = AKSPreviewCreateDecorator(self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + mc_out = dec.set_up_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile.keda) + self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) + def test_construct_mc_preview_profile(self): import inspect @@ -5051,6 +5170,88 @@ def test_update_identity_profile(self): ) self.assertEqual(dec_mc_5, ground_truth_mc_5) + def test_update_workload_auto_scaler_profile(self): + # Throws exception when incorrect mc object is passed. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + with self.assertRaisesRegex(CLIInternalError, "^Unexpected mc object with type ''\.$"): + dec.update_workload_auto_scaler_profile(None) + + # Throws exception when the mc object passed does not match the one in context. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + with self.assertRaisesRegex(CLIInternalError, "^Inconsistent state detected\. The incoming `mc` is not the same as the `mc` in the context\.$"): + mc_in = self.models.ManagedCluster(location="test_location") + dec.update_workload_auto_scaler_profile(mc_in) + + # Leaves profile as None without raw parameters. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + dec.context.attach_mc(mc_in) + mc_out = dec.update_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertIsNone(mc_out.workload_auto_scaler_profile) + + # Leaves existing profile untouched without raw parameters. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + profile = self.models.ManagedClusterWorkloadAutoScalerProfile( + keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True)) + mc_in = self.models.ManagedCluster(location="test_location", workload_auto_scaler_profile = profile) + dec.context.attach_mc(mc_in) + mc_out = dec.update_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertEqual(mc_out.workload_auto_scaler_profile, profile) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile.keda) + self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) + + # Enables keda when enable_keda is True. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + dec.context.attach_mc(mc_in) + mc_out = dec.update_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile.keda) + self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) + + # Enables keda in existing profile when enable_keda is True. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + profile = self.models.ManagedClusterWorkloadAutoScalerProfile( + keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False)) + mc_in = self.models.ManagedCluster(location="test_location", workload_auto_scaler_profile = profile) + dec.context.attach_mc(mc_in) + mc_out = dec.update_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertEqual(mc_out.workload_auto_scaler_profile, profile) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile.keda) + self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) + + # Disables keda when disable_keda is True. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {"disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + dec.context.attach_mc(mc_in) + mc_out = dec.update_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile.keda) + self.assertFalse(mc_out.workload_auto_scaler_profile.keda.enabled) + + # Disables keda in existing profile when disable_keda is True. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {"disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + profile = self.models.ManagedClusterWorkloadAutoScalerProfile( + keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True)) + mc_in = self.models.ManagedCluster(location="test_location", workload_auto_scaler_profile = profile) + dec.context.attach_mc(mc_in) + mc_out = dec.update_workload_auto_scaler_profile(mc_in) + self.assertEqual(mc_out, mc_in) + self.assertEqual(mc_out.workload_auto_scaler_profile, profile) + self.assertIsNotNone(mc_out.workload_auto_scaler_profile.keda) + self.assertFalse(mc_out.workload_auto_scaler_profile.keda.enabled) + + # Throws exception when both enable_keda and disable_keda are True. + dec = AKSPreviewUpdateDecorator(self.cmd, self.client, {"enable_keda": True, "disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + mc_in = self.models.ManagedCluster(location="test_location") + dec.context.attach_mc(mc_in) + with self.assertRaises(MutuallyExclusiveArgumentError): + mc_out = dec.update_workload_auto_scaler_profile(mc_in) def test_patch_mc(self): # custom value diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index dfed9fa2034..4ac446825b7 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages -VERSION = "0.5.78" +VERSION = "0.5.79" CLASSIFIERS = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers",