diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 3e4f2308173..b83cf078c95 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.75 +++++++ + +* Add support for web application routing. * Refactor: Removed redundant `--disable-workload-identity` flag. User can disable the workload identity feature by using `--enable-workload-identity False`. 0.5.74 diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 164da6c670f..0d66bb105ff 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -136,7 +136,10 @@ "confcom": CONST_CONFCOM_ADDON_NAME, 'open-service-mesh': CONST_OPEN_SERVICE_MESH_ADDON_NAME, 'azure-keyvault-secrets-provider': CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, - 'gitops': CONST_GITOPS_ADDON_NAME + 'gitops': CONST_GITOPS_ADDON_NAME, + # web_application_routing key has no mapping to a name since ingress profile, not addon profile, is + # used to contain settings for web_application_routing + 'web_application_routing': "" } ADDONS_DESCRIPTIONS = { diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 5f59f19c09e..4c2575a2625 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -186,6 +186,7 @@ open-service-mesh - enable Open Service Mesh addon (PREVIEW). gitops - enable GitOps (PREVIEW). azure-keyvault-secrets-provider - enable Azure Keyvault Secrets Provider addon (PREVIEW). + web_application_routing - enable Web Application Routing addon (PREVIEW). Specify "--dns-zone-resource-id" to configure DNS. - name: --disable-rbac type: bool short-summary: Disable Kubernetes Role-Based Access Control. @@ -437,6 +438,9 @@ - name: --azure-keyvault-kms-key-id type: string short-summary: Identifier of Azure Key Vault key. + - name: --dns-zone-resource-id + type: string + short-summary: The resource ID of the DNS zone resource to use with the web_application_routing addon. 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 @@ -1331,6 +1335,7 @@ open-service-mesh - enable Open Service Mesh addon (PREVIEW). gitops - enable GitOps (PREVIEW). azure-keyvault-secrets-provider - enable Azure Keyvault Secrets Provider addon (PREVIEW). + web_application_routing - enable Web Application Routing addon (PREVIEW). Specify "--dns-zone-resource-id" to configure DNS. parameters: - name: --addon -a type: string @@ -1371,6 +1376,9 @@ - name: --rotation-poll-interval type: string short-summary: Set interval of rotation poll. Use with azure-keyvault-secrets-provider addon. + - name: --dns-zone-resource-id + type: string + short-summary: The resource ID of the DNS zone resource to use with the web_application_routing addon. examples: - name: Enable a Kubernetes addon. (autogenerated) text: az aks addon enable --addon virtual-node --name MyManagedCluster --resource-group MyResourceGroup --subnet-name VirtualNodeSubnet @@ -1426,6 +1434,9 @@ - name: --rotation-poll-interval type: string short-summary: Set interval of rotation poll. Use with azure-keyvault-secrets-provider addon. + - name: --dns-zone-resource-id + type: string + short-summary: The resource ID of the DNS zone resource to use with the web_application_routing addon. examples: - name: Update a Kubernetes addon. (autogenerated) text: az aks addon update --addon virtual-node --name MyManagedCluster --resource-group MyResourceGroup --subnet-name VirtualNodeSubnet @@ -1454,6 +1465,7 @@ open-service-mesh - enable Open Service Mesh addon (PREVIEW). gitops - enable GitOps (PREVIEW). azure-keyvault-secrets-provider - enable Azure Keyvault Secrets Provider addon (PREVIEW). + web_application_routing - enable Web Application Routing addon (PREVIEW). Specify "--dns-zone-resource-id" to configure DNS. parameters: - name: --addons -a type: string @@ -1494,6 +1506,9 @@ - name: --rotation-poll-interval type: string short-summary: Set interval of rotation poll. Use with azure-keyvault-secrets-provider addon. + - name: --dns-zone-resource-id + type: string + short-summary: The resource ID of the DNS zone resource to use with the web_application_routing addon. examples: - name: Enable Kubernetes addons. (autogenerated) text: az aks enable-addons --addons virtual-node --name MyManagedCluster --resource-group MyResourceGroup --subnet-name VirtualNodeSubnet diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index bff0f1d1426..8ecc3a13750 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -297,6 +297,7 @@ def load_arguments(self, _): c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) 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('dns-zone-resource-id') with self.argument_context('aks update') as c: # managed cluster paramerters @@ -512,6 +513,7 @@ def load_arguments(self, _): c.argument('workspace_resource_id') c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) + c.argument('dns-zone-resource-id') with self.argument_context('aks addon disable') as c: c.argument('addon', options_list=[ @@ -540,6 +542,7 @@ def load_arguments(self, _): c.argument('workspace_resource_id') c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) + c.argument('dns-zone-resource-id') with self.argument_context('aks disable-addons') as c: c.argument('addons', options_list=[ @@ -568,6 +571,7 @@ def load_arguments(self, _): c.argument('workspace_resource_id') c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) + c.argument('dns-zone-resource-id') with self.argument_context('aks get-credentials') as c: c.argument('admin', options_list=['--admin', '-a'], default=False) diff --git a/src/aks-preview/azext_aks_preview/addonconfiguration.py b/src/aks-preview/azext_aks_preview/addonconfiguration.py index 9b6807010aa..ba1e12f8073 100644 --- a/src/aks-preview/azext_aks_preview/addonconfiguration.py +++ b/src/aks-preview/azext_aks_preview/addonconfiguration.py @@ -21,6 +21,10 @@ CONST_INGRESS_APPGW_WATCH_NAMESPACE, CONST_OPEN_SERVICE_MESH_ADDON_NAME, CONST_CONFCOM_ADDON_NAME, \ CONST_ACC_SGX_QUOTE_HELPER_ENABLED, CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, CONST_SECRET_ROTATION_ENABLED, CONST_ROTATION_POLL_INTERVAL, \ CONST_KUBE_DASHBOARD_ADDON_NAME +from .vendored_sdks.azure_mgmt_preview_aks.v2022_04_02_preview.models import ( + ManagedClusterIngressProfile, + ManagedClusterIngressProfileWebAppRouting, +) logger = get_logger(__name__) @@ -43,6 +47,7 @@ def enable_addons(cmd, enable_secret_rotation=False, rotation_poll_interval=None, no_wait=False, + dns_zone_resource_id=None, enable_msi_auth_for_monitoring=False): instance = client.get(resource_group_name, name) # this is overwritten by _update_addons(), so the value needs to be recorded here @@ -57,7 +62,8 @@ def enable_addons(cmd, appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, enable_sgxquotehelper=enable_sgxquotehelper, - enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait) + enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, + dns_zone_resource_id=dns_zone_resource_id) if CONST_MONITORING_ADDON_NAME in instance.addon_profiles and instance.addon_profiles[ CONST_MONITORING_ADDON_NAME].enabled: @@ -142,6 +148,7 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, + dns_zone_resource_id=None, no_wait=False): # pylint: disable=unused-argument # parse the comma-separated addons argument addon_args = addons.split(',') @@ -159,6 +166,19 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements # for each addons argument for addon_arg in addon_args: + if addon_arg == "web_application_routing": + # web app routing settings are in ingress profile, not addon profile, so deal + # with it separately + if instance.ingress_profile is None: + instance.ingress_profile = ManagedClusterIngressProfile() + if instance.ingress_profile.web_app_routing is None: + instance.ingress_profile.web_app_routing = ManagedClusterIngressProfileWebAppRouting() + instance.ingress_profile.web_app_routing.enabled = enable + + if dns_zone_resource_id is not None: + instance.ingress_profile.web_app_routing.dns_zone_resource_id = dns_zone_resource_id + continue + if addon_arg not in ADDONS: raise CLIError("Invalid addon name: {}.".format(addon_arg)) addon = ADDONS[addon_arg] diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 527d36b2430..580e4d0ada8 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -147,6 +147,8 @@ ManagedClusterSnapshot, SysctlConfig, UserAssignedIdentity, + ManagedClusterIngressProfile, + ManagedClusterIngressProfileWebAppRouting, ) from azext_aks_preview.aks_draft.commands import ( @@ -809,6 +811,7 @@ def aks_create(cmd, azure_keyvault_kms_key_id=None, enable_apiserver_vnet_integration=False, apiserver_subnet_id=None, + dns_zone_resource_id=None, yes=False): # DO NOT MOVE: get all the original parameters and save them as a dictionary raw_parameters = locals() @@ -1362,6 +1365,7 @@ def _handle_addons_args(cmd, # pylint: disable=too-many-statements aci_subnet_name=None, vnet_subnet_id=None, enable_secret_rotation=False, + dns_zone_resource_id=None, rotation_poll_interval=None,): if not addon_profiles: addon_profiles = {} @@ -2049,13 +2053,15 @@ def aks_addon_enable(cmd, client, resource_group_name, name, addon, workspace_re subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, appgw_subnet_id=None, appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, - no_wait=False, enable_msi_auth_for_monitoring=False): + no_wait=False, enable_msi_auth_for_monitoring=False, + dns_zone_resource_id=None): return enable_addons(cmd, client, resource_group_name, name, addon, workspace_resource_id=workspace_resource_id, subnet_name=subnet_name, appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, enable_sgxquotehelper=enable_sgxquotehelper, enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, - enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring) + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + dns_zone_resource_id=dns_zone_resource_id) def aks_addon_disable(cmd, client, resource_group_name, name, addon, no_wait=False): @@ -2066,12 +2072,18 @@ def aks_addon_update(cmd, client, resource_group_name, name, addon, workspace_re subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, appgw_subnet_id=None, appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, - no_wait=False, enable_msi_auth_for_monitoring=False): - addon_profiles = client.get(resource_group_name, name).addon_profiles - addon_key = ADDONS[addon] + no_wait=False, enable_msi_auth_for_monitoring=False, + dns_zone_resource_id=None): + instance = client.get(resource_group_name, name) + addon_profiles = instance.addon_profiles - if not addon_profiles or addon_key not in addon_profiles or not addon_profiles[addon_key].enabled: - raise CLIError(f'Addon "{addon}" is not enabled in this cluster.') + if addon == "web_application_routing": + if (instance.ingress_profile is None) or (instance.ingress_profile.web_app_routing is None) or not instance.ingress_profile.web_app_routing.enabled: + raise InvalidArgumentValueError(f'Addon "{addon}" is not enabled in this cluster.') + else: + addon_key = ADDONS[addon] + if not addon_profiles or addon_key not in addon_profiles or not addon_profiles[addon_key].enabled: + raise InvalidArgumentValueError(f'Addon "{addon}" is not enabled in this cluster.') return enable_addons(cmd, client, resource_group_name, name, addon, check_enabled=False, workspace_resource_id=workspace_resource_id, @@ -2079,7 +2091,8 @@ def aks_addon_update(cmd, client, resource_group_name, name, addon, workspace_re appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, enable_sgxquotehelper=enable_sgxquotehelper, enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, - enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring) + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + dns_zone_resource_id=dns_zone_resource_id) def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=False): @@ -2124,7 +2137,8 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_resource_id=None, subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, appgw_subnet_id=None, - appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, no_wait=False, enable_msi_auth_for_monitoring=False): + appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, no_wait=False, enable_msi_auth_for_monitoring=False, + dns_zone_resource_id=None): instance = client.get(resource_group_name, name) # this is overwritten by _update_addons(), so the value needs to be recorded here @@ -2134,7 +2148,8 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_ instance = _update_addons(cmd, instance, subscription_id, resource_group_name, name, addons, enable=True, workspace_resource_id=workspace_resource_id, enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, subnet_name=subnet_name, appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, - enable_sgxquotehelper=enable_sgxquotehelper, enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait) + enable_sgxquotehelper=enable_sgxquotehelper, enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, + dns_zone_resource_id=dns_zone_resource_id) if CONST_MONITORING_ADDON_NAME in instance.addon_profiles and instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled: if CONST_MONITORING_USING_AAD_MSI_AUTH in instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and \ @@ -2219,6 +2234,7 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements enable_secret_rotation=False, disable_secret_rotation=False, rotation_poll_interval=None, + dns_zone_resource_id=None, no_wait=False): # pylint: disable=unused-argument # parse the comma-separated addons argument @@ -2230,6 +2246,19 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements # for each addons argument for addon_arg in addon_args: + if addon_arg == "web_application_routing": + # web app routing settings are in ingress profile, not addon profile, so deal + # with it separately + if instance.ingress_profile is None: + instance.ingress_profile = ManagedClusterIngressProfile() + if instance.ingress_profile.web_app_routing is None: + instance.ingress_profile.web_app_routing = ManagedClusterIngressProfileWebAppRouting() + instance.ingress_profile.web_app_routing.enabled = enable + + if dns_zone_resource_id is not None: + instance.ingress_profile.web_app_routing.dns_zone_resource_id = dns_zone_resource_id + continue + if addon_arg not in ADDONS: raise CLIError("Invalid addon name: {}.".format(addon_arg)) addon = ADDONS[addon_arg] diff --git a/src/aks-preview/azext_aks_preview/decorator.py b/src/aks-preview/azext_aks_preview/decorator.py index 8011c40e807..43d09b5b2a7 100644 --- a/src/aks-preview/azext_aks_preview/decorator.py +++ b/src/aks-preview/azext_aks_preview/decorator.py @@ -95,6 +95,8 @@ Snapshot = TypeVar("Snapshot") ManagedClusterSnapshot = TypeVar("ManagedClusterSnapshot") AzureKeyVaultKms = TypeVar('AzureKeyVaultKms') +ManagedClusterIngressProfile = TypeVar('ManagedClusterIngressProfile') +ManagedClusterIngressProfileWebAppRouting = TypeVar('ManagedClusterIngressProfileWebAppRouting') # pylint: disable=too-many-instance-attributes,too-few-public-methods @@ -142,6 +144,16 @@ def __init__(self, cmd: AzCommandsLoader, resource_type: ResourceType): resource_type=self.resource_type, operation_group="managed_clusters", ) + self.ManagedClusterIngressProfileWebAppRouting = self.__cmd.get_models( + "ManagedClusterIngressProfileWebAppRouting", + resource_type=self.resource_type, + operation_group="managed_clusters", + ) + self.ManagedClusterIngressProfile = self.__cmd.get_models( + "ManagedClusterIngressProfile", + resource_type=self.resource_type, + operation_group="managed_clusters", + ) self.AzureKeyVaultKms = self.__cmd.get_models( "AzureKeyVaultKms", resource_type=self.resource_type, @@ -2362,6 +2374,19 @@ def build_gitops_addon_profile(self) -> ManagedClusterAddonProfile: ) return gitops_addon_profile + def build_web_app_routing_profile(self) -> ManagedClusterIngressProfileWebAppRouting: + """Build the ingress_profile.web_app_routing profile + + :return: a ManagedClusterIngressProfileWebAppRouting object + """ + profile = self.models.ManagedClusterIngressProfileWebAppRouting( + enabled=True, + ) + dns_zone_resource_id = self.context.raw_param.get("dns_zone_resource_id") + if dns_zone_resource_id is not None: + profile.dns_zone_resource_id = dns_zone_resource_id + return profile + def set_up_addon_profiles(self, mc: ManagedCluster) -> ManagedCluster: """Set up addon profiles for the ManagedCluster object. @@ -2380,6 +2405,12 @@ def set_up_addon_profiles(self, mc: ManagedCluster) -> ManagedCluster: CONST_GITOPS_ADDON_NAME ] = self.build_gitops_addon_profile() mc.addon_profiles = addon_profiles + + if "web_application_routing" in addons: + if mc.ingress_profile is None: + mc.ingress_profile = self.models.ManagedClusterIngressProfile() + mc.ingress_profile.web_app_routing = self.build_web_app_routing_profile() + return mc def set_up_windows_profile(self, mc: ManagedCluster) -> ManagedCluster: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_web_application_routing_dns_zone_not_exist.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_web_application_routing_dns_zone_not_exist.yaml new file mode 100644 index 00000000000..97c2694501b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_web_application_routing_dns_zone_not_exist.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons --dns-zone-resource-id --ssh-key-value + -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.9.12 (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-25T03:25:12Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '305' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 25 May 2022 03:25:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestnuwliroyn-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + 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": {}, "ingressProfile": {"webAppRouting": + {"enabled": true, "dnsZoneResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/notexist/providers/Microsoft.Network/dnsZones/notexist.com"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1976' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-addons --dns-zone-resource-id --ssh-key-value + -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-02-preview + response: + body: + string: "{\n \"code\": \"BadRequest\",\n \"message\": \"The Azure DNS Zone + '/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/notexist/providers/Microsoft.Network/dnsZones/notexist.com' + does not exist\",\n \"subcode\": \"WebAppRoutingDNSZoneNotFound\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '250' + content-type: + - application/json + date: + - Wed, 25 May 2022 03:25:17 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: + - '1199' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_web_application_routing.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_web_application_routing.yaml new file mode 100644 index 00000000000..e468f2fffe7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_web_application_routing.yaml @@ -0,0 +1,618 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.9.12 (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-21T03:27:30Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '305' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 21 May 2022 03:27:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestin4u5n5e6-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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": {}, "ingressProfile": {"webAppRouting": + {"enabled": true}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1660' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestin4u5n5e6-8ecadf\",\n \"fqdn\": \"cliakstest-clitestin4u5n5e6-8ecadf-9c1eb6a8.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestin4u5n5e6-8ecadf-9c1eb6a8.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + true,\n \"dnsZoneResourceId\": \"\"\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/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3347' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:27:37 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: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:28:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:28:37 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 --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:29:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:29:37 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 --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:30:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:30:37 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 --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:31:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a8306be4-1f8c-4113-8ac6-b7614ce06ef9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"e46b30a8-8c1f-1341-8ac6-b7614ce06ef9\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-21T03:27:37.67Z\",\n \"endTime\": + \"2022-05-21T03:31:25.6477942Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:31:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-addons -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestin4u5n5e6-8ecadf\",\n \"fqdn\": \"cliakstest-clitestin4u5n5e6-8ecadf-9c1eb6a8.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestin4u5n5e6-8ecadf-9c1eb6a8.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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/d571ff34-d124-45e5-8e6f-c9bdfc1e9f24\"\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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + true,\n \"dnsZoneResourceId\": \"\"\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: + - '4000' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:31:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_disable_addon_web_app_routing.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_disable_addon_web_app_routing.yaml new file mode 100644 index 00000000000..250d12f7da6 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_disable_addon_web_app_routing.yaml @@ -0,0 +1,1057 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.9.12 (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-21T03:41:57Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '305' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 21 May 2022 03:41:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestw3dyx32mh-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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": {}, "ingressProfile": {"webAppRouting": + {"enabled": true}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1660' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestw3dyx32mh-8ecadf\",\n \"fqdn\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + true,\n \"dnsZoneResourceId\": \"\"\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/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3347' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:42:03 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: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:42: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 create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:43: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 create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:43: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 create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:44: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 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:44: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 create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:45: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 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:45: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 create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/4470633d-0d52-4af0-a1bb-b435addfb15a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"3d637044-520d-f04a-a1bb-b435addfb15a\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-21T03:42:03.0733333Z\",\n \"endTime\": + \"2022-05-21T03:45:39.6835319Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:46:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestw3dyx32mh-8ecadf\",\n \"fqdn\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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/037fbeb6-2810-4e8c-bb85-d7cc02029af0\"\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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + true,\n \"dnsZoneResourceId\": \"\"\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: + - '4000' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:46:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks disable-addons + Connection: + - keep-alive + ParameterSetName: + - --addons --resource-group --name -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestw3dyx32mh-8ecadf\",\n \"fqdn\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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/037fbeb6-2810-4e8c-bb85-d7cc02029af0\"\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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + true,\n \"dnsZoneResourceId\": \"\"\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: + - '4000' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:46:05 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-clitestw3dyx32mh-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, "enableEncryptionAtHost": false, "enableUltraSSD": + false, "enableFIPS": false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": + "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.com\n"}]}}, "addonProfiles": {}, "oidcIssuerProfile": {"enabled": + false}, "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}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/037fbeb6-2810-4e8c-bb85-d7cc02029af0"}]}, + "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": {}, + "ingressProfile": {"webAppRouting": {"enabled": false, "dnsZoneResourceId": + ""}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks disable-addons + Connection: + - keep-alive + Content-Length: + - '2683' + Content-Type: + - application/json + ParameterSetName: + - --addons --resource-group --name -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestw3dyx32mh-8ecadf\",\n \"fqdn\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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/037fbeb6-2810-4e8c-bb85-d7cc02029af0\"\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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + true,\n \"dnsZoneResourceId\": \"\"\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/84f1ebcf-e322-4748-91d0-9c7567abb3be?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3998' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:46:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks disable-addons + Connection: + - keep-alive + ParameterSetName: + - --addons --resource-group --name -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/84f1ebcf-e322-4748-91d0-9c7567abb3be?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"cfebf184-22e3-4847-91d0-9c7567abb3be\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:46:08.83Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:46:39 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 disable-addons + Connection: + - keep-alive + ParameterSetName: + - --addons --resource-group --name -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/84f1ebcf-e322-4748-91d0-9c7567abb3be?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"cfebf184-22e3-4847-91d0-9c7567abb3be\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-05-21T03:46:08.83Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:47:09 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 disable-addons + Connection: + - keep-alive + ParameterSetName: + - --addons --resource-group --name -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/84f1ebcf-e322-4748-91d0-9c7567abb3be?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"cfebf184-22e3-4847-91d0-9c7567abb3be\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-05-21T03:46:08.83Z\",\n \"endTime\": + \"2022-05-21T03:47:20.7462756Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:47:39 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 disable-addons + Connection: + - keep-alive + ParameterSetName: + - --addons --resource-group --name -o + User-Agent: + - AZURECLI/2.36.0 azsdk-python-azure-mgmt-containerservice/19.0.0b Python/3.9.12 + (macOS-12.4-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-04-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-clitestw3dyx32mh-8ecadf\",\n \"fqdn\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitestw3dyx32mh-8ecadf-3f40a336.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 \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.04.27\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDgtJLw9Oj64Vk/Lng/u+4hX+XtwOWkrdDo9DQXPDe7wLF6GQVI3PVa0QT/IVjxKglJA4K6lr82XSFcyMLCye6zomkV4prAhSE3vzsP/pQNgQZyytrtJpqu+VWFFIJYvBZXvOnVNdb5cK2AI6uVDoSHZiu4qDGA8qJII78Zn62WUaClQ5JV1sQowK5FWJHcIlxuCqpsINTdyepz+YHwy428pq1kPaQ+Es3BAzO8uCtmej3VeDcOtdOHE8TrFIazehP3w0VOviyaNXFV8BTGjScv+GAkxuLLJzzBAv1CZvWXxsQAZHlCbCALE6nRJ9BDg4QVJUG5szJOZX6vEnNqc0C2uW5y7HQ57VcvrPVuYDpa8ZWm2HtbEeEHQQduQDtOgbTEJ33RclUyp+3xrpkXDCfMNej0RXd9F+Xw6eowIBUVXgXCZfe2OvhjX2qt+4IvkO8/vsyxv0CyDzj8PptgAHbj0lTCpjIsRb6tSas6psFWpW3MJP4g/J1Y3nxgJPjcUcs= + yizhang5@microsoft.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/037fbeb6-2810-4e8c-bb85-d7cc02029af0\"\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 \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"ingressProfile\": {\n \"webAppRouting\": {\n \"enabled\": + false,\n \"dnsZoneResourceId\": \"\"\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: + - '4000' + content-type: + - application/json + date: + - Sat, 21 May 2022 03:47:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 35e0254b9cb..4ffcf589f0f 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 @@ -12,6 +12,7 @@ from azure.cli.command_modules.acs._format import version_to_tuple from azure.cli.testsdk.scenario_tests import AllowLargeResponse from knack.util import CLIError +from azure.core.exceptions import HttpResponseError from .recording_processors import KeyReplacer from .custom_preparers import AKSCustomResourceGroupPreparer @@ -4173,6 +4174,68 @@ def test_aks_create_with_apiserver_vnet_integration(self, resource_group, resour self.is_empty(), ]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_web_application_routing(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--enable-addons web_application_routing --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('ingressProfile.webAppRouting.enabled', True), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_web_application_routing_dns_zone_not_exist(self, resource_group, resource_group_location): + # Test creation failure when using an non-existing dns zone resource ID. + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--enable-addons web_application_routing ' \ + '--dns-zone-resource-id "/subscriptions/8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8/resourcegroups/notexist/providers/Microsoft.Network/dnsZones/notexist.com" ' \ + '--ssh-key-value={ssh_key_value} -o json' + try: + self.cmd(create_cmd, checks=[]) + raise Exception("didn't get expected failure") + except HttpResponseError: + # expected failure + pass + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_disable_addon_web_app_routing(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '-a web_application_routing --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('ingressProfile.webAppRouting.enabled', True), + ]) + + disable_cmd = 'aks disable-addons --addons web_application_routing --resource-group={resource_group} --name={name} -o json' + self.cmd(disable_cmd, checks=[ + self.check('provisioningState', 'Succeeded') + # Enable this once the backend bug fix has been rolled out. + # self.check('ingressProfile.webAppRouting.enabled', False) + ]) @live_only() # live only is required for test environment setup like `az login` @AllowLargeResponse() @@ -4183,7 +4246,6 @@ def test_list_trustedaccess_roles(self): 'type', 'Microsoft.ContainerService/locations/trustedaccessroles') ]) - @live_only() # this test requires live_only because a binary is downloaded def test_aks_draft_with_helm(self): import tempfile, os diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 52e9fabc77c..970fccb82a3 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.74" +VERSION = "0.5.75" CLASSIFIERS = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers",