diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index b24b9ea575..1a56c1282c 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,6 +12,11 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ +0.5.109 ++++++++ + +* Add --enable-cilium-dataplane flag for creating a cluster that uses Cilium as the networking dataplane. + 0.5.108 +++++++ diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 11dc0d40b0..58b55b3823 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -91,6 +91,9 @@ # network plugin mode CONST_NETWORK_PLUGIN_MODE_OVERLAY = "overlay" +# networkprofile eBPF dataplane +CONST_EBPF_DATAPLANE_CILIUM = "cilium" + # disk driver versions CONST_DISK_DRIVER_V1 = "v1" CONST_DISK_DRIVER_V2 = "v2" diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 779cc61f01..d3bf7cd96f 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -215,6 +215,12 @@ Using together with "azure" network plugin. Specify "azure" for Azure network policy manager and "calico" for calico network policy controller. Defaults to "" (network policy disabled). + - name: --enable-cilium-dataplane + type: bool + short-summary: Use Cilium as the networking dataplane for the Kubernetes cluster. + long-summary: | + Used together with the "azure" network plugin. + Requires either --pod-subnet-id or --network-plugin-mode=overlay. - name: --no-ssh-key -x type: string short-summary: Do not use or create a local SSH key. diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 807f624fcf..28cd6af313 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -333,6 +333,7 @@ def load_arguments(self, _): c.argument('dns_zone_resource_id') c.argument('enable_keda', action='store_true', is_preview=True) c.argument('enable_node_restriction', action='store_true', is_preview=True, help="enable node restriction for cluster") + c.argument('enable_cilium_dataplane', action='store_true', is_preview=True) # nodepool c.argument('host_group_id', validator=validate_host_group_id, is_preview=True) c.argument('crg_id', validator=validate_crg_id, is_preview=True) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index a11caf82d5..35d6e9b25b 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -673,6 +673,7 @@ def aks_create( enable_keda=False, enable_node_restriction=False, enable_vpa=False, + enable_cilium_dataplane=False, # nodepool host_group_id=None, crg_id=None, diff --git a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py index 6d21467320..947b94c287 100644 --- a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py @@ -49,6 +49,7 @@ CONST_LOAD_BALANCER_SKU_BASIC, CONST_PRIVATE_DNS_ZONE_NONE, CONST_PRIVATE_DNS_ZONE_SYSTEM, + CONST_EBPF_DATAPLANE_CILIUM, ) from azext_aks_preview._helpers import ( get_cluster_snapshot_by_snapshot_id, @@ -321,6 +322,13 @@ def get_network_plugin_mode(self) -> Union[str, None]: """ return self.raw_param.get('network_plugin_mode') + def get_enable_cilium_dataplane(self) -> bool: + """Get the value of enable_cilium_dataplane + + :return: bool + """ + return bool(self.raw_param.get('enable_cilium_dataplane')) + def get_load_balancer_managed_outbound_ipv6_count(self) -> Union[int, None]: """Obtain the expected count of IPv6 managed outbound IPs. @@ -2160,6 +2168,9 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster: network_profile.network_plugin_mode = self.context.get_network_plugin_mode() + if self.context.get_enable_cilium_dataplane(): + network_profile.ebpf_dataplane = CONST_EBPF_DATAPLANE_CILIUM + return mc def set_up_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_enable_cilium_dataplane.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_enable_cilium_dataplane.yaml new file mode 100644 index 0000000000..efe62a5511 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_enable_cilium_dataplane.yaml @@ -0,0 +1,892 @@ +interactions: +- request: + body: '{"location": "centraluseuap", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-cliteste542dzhka-8ecadf", + "agentPoolProfiles": [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "", "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "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": "azure", "networkPluginMode": "overlay", + "ebpfDataplane": "cilium", "podCidr": "10.244.0.0/16", "outboundType": "loadBalancer", + "loadBalancerSku": "standard"}, "disableLocalAccounts": false, "storageProfile": + {}}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/CiliumDataplanePreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1854' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2022-09-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"centraluseuap\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.23.12\",\n \"currentKubernetesVersion\": \"1.23.12\",\n \"dnsPrefix\": + \"cliakstest-cliteste542dzhka-8ecadf\",\n \"fqdn\": \"cliakstest-cliteste542dzhka-8ecadf-57167e23.hcp.centraluseuap.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-cliteste542dzhka-8ecadf-57167e23.portal.hcp.centraluseuap.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 250,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.23.12\",\n \"currentOrchestratorVersion\": \"1.23.12\",\n \"enableNodePublicIP\": + false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.10.03\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"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\"\n }\n ]\n }\n },\n \"windowsProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"enableCSIProxy\": true\n },\n + \ \"servicePrincipalProfile\": {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n + \ },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000001_centraluseuap\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"azure\",\n \"networkPluginMode\": \"overlay\",\n + \ \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": + {\n \"count\": 1\n },\n \"backendPoolType\": \"nodeIPConfiguration\"\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 \"ebpfDataplane\": \"cilium\"\n },\n \"maxAgentPools\": + 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": {},\n \"storageProfile\": + {\n \"diskCSIDriver\": {\n \"enabled\": true,\n \"version\": \"v1\"\n + \ },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": + {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": + false\n },\n \"workloadAutoScalerProfile\": {}\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/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3961' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:42:58 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 --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:43:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:43:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:44:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:44:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:45:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:45:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:46:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:46:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:47:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:47:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:48:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:49:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/2b4c07d1-f579-4182-ad2e-c164bc0f59a2?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d1074c2b-79f5-8241-ad2e-c164bc0f59a2\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2022-10-18T20:42:58.4899792Z\",\n \"endTime\": + \"2022-10-18T20:49:03.6167394Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:49:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --network-plugin --network-plugin-mode + --ssh-key-value --pod-cidr --node-count --enable-cilium-dataplane --aks-custom-headers + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2022-09-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"centraluseuap\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.23.12\",\n \"currentKubernetesVersion\": \"1.23.12\",\n \"dnsPrefix\": + \"cliakstest-cliteste542dzhka-8ecadf\",\n \"fqdn\": \"cliakstest-cliteste542dzhka-8ecadf-57167e23.hcp.centraluseuap.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-cliteste542dzhka-8ecadf-57167e23.portal.hcp.centraluseuap.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 250,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.23.12\",\n \"currentOrchestratorVersion\": \"1.23.12\",\n \"enableNodePublicIP\": + false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2022.10.03\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"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\"\n }\n ]\n }\n },\n \"windowsProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"enableCSIProxy\": true\n },\n + \ \"servicePrincipalProfile\": {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n + \ },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000001_centraluseuap\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"azure\",\n \"networkPluginMode\": \"overlay\",\n + \ \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": + {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_centraluseuap/providers/Microsoft.Network/publicIPAddresses/cc9e963f-8c7e-4051-99fd-ecba02b4abff\"\n + \ }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\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 \"ebpfDataplane\": \"cilium\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_centraluseuap/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": + {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": + true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\": + true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n + \ },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n },\n \"workloadAutoScalerProfile\": + {}\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: + - '4626' + content-type: + - application/json + date: + - Tue, 18 Oct 2022 20:49:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.41.0 azsdk-python-azure-mgmt-containerservice/20.4.0b Python/3.10.6 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2022-09-02-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operations/c39e9646-c372-40d7-8e7b-8b4ff245ef98?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 18 Oct 2022 20:49:32 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/centraluseuap/operationresults/c39e9646-c372-40d7-8e7b-8b4ff245ef98?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 2282ca996d..9706c25b87 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 @@ -3691,6 +3691,38 @@ def test_aks_create_with_overlay_network_plugin_mode(self, resource_group, resou self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) + def test_aks_create_with_enable_cilium_dataplane(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'resource_type': 'Microsoft.ContainerService/ManagedClusters', + 'ssh_key_value': self.generate_ssh_keys(), + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} ' \ + '--pod-cidr 10.244.0.0/16 --node-count 1 ' \ + '--enable-cilium-dataplane ' \ + '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CiliumDataplanePreview' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('networkProfile.podCidr', '10.244.0.0/16'), + self.check('networkProfile.networkPluginMode', 'overlay'), + self.check('networkProfile.ebpfDataplane', 'cilium'), + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) def test_aks_create_dualstack_with_default_network(self, resource_group, resource_group_location): diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py index 72db92127b..0289f6bd25 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py @@ -598,6 +598,42 @@ def test_mc_get_network_plugin_mode(self): ) self.assertEqual(ctx_3.get_network_plugin_mode(), "") + def test_mc_get_enable_cilium_dataplane(self): + # Default, not set. + ctx_1 = AKSPreviewManagedClusterContext( + self.cmd, + AKSManagedClusterParamDict({}), + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + self.assertEqual(ctx_1.get_enable_cilium_dataplane(), False) + + # Flag set to True. + ctx_2 = AKSPreviewManagedClusterContext( + self.cmd, + AKSManagedClusterParamDict( + { + "enable_cilium_dataplane": True, + } + ), + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + self.assertEqual(ctx_2.get_enable_cilium_dataplane(), True) + + # Flag set to False. + ctx_3 = AKSPreviewManagedClusterContext( + self.cmd, + AKSManagedClusterParamDict( + { + "enable_cilium_dataplane": False, + } + ), + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + self.assertEqual(ctx_1.get_enable_cilium_dataplane(), False) + def test_get_enable_managed_identity(self): # custom value ctx_1 = AKSPreviewManagedClusterContext( diff --git a/src/aks-preview/linter_exclusions.yml b/src/aks-preview/linter_exclusions.yml index 372a78ea97..23d355bb8e 100644 --- a/src/aks-preview/linter_exclusions.yml +++ b/src/aks-preview/linter_exclusions.yml @@ -36,6 +36,9 @@ aks create: enable_vpa: rule_exclusions: - option_length_too_long + enable_cilium_dataplane: + rule_exclusions: + - option_length_too_long aks delete: parameters: ignore_pod_disruption_budget: diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 62861891c9..632cd760c8 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.108" +VERSION = "0.5.109" CLASSIFIERS = [ "Development Status :: 4 - Beta",