diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 6363e8ac1ad..c105c9e423a 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -11,9 +11,13 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ + +19.0.0b29 ++++++++ * Add MIG (Multi-Instance GPU) strategy option to node pool property in `az aks nodepool add` and `az aks nodepool update`. -* `az aks create/update`: Add `--outbound-type managedNATGatewayV2` support using Azure NAT Gateway Standard V2 SKU with IPv6, user-provided IPs, and IP prefixes. * Fix monitoring addon key casing compatibility with azure-cli/acs +* `az aks create/update`: Add `--outbound-type managedNATGatewayV2` support using Azure NAT Gateway Standard V2 SKU with IPv6, user-provided IPs, and IP prefixes. +* `az aks create/update`: Fix `--outbound-type managedNATGatewayV2` being silently overwritten to `loadBalancer` by the dynamic completion logic. 19.0.0b28 +++++++ 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 26dded2e118..d0ccbfb0389 100644 --- a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py @@ -561,6 +561,7 @@ def _get_outbound_type( not read_from_mc and outbound_type not in [ CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY_V2, CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY, CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, CONST_OUTBOUND_TYPE_NONE, @@ -580,6 +581,7 @@ def _get_outbound_type( if outbound_type in [ CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY_V2, CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY, ]: if safe_lower(self._get_load_balancer_sku(enable_validation=False)) == CONST_LOAD_BALANCER_SKU_BASIC: @@ -622,7 +624,10 @@ def _get_outbound_type( a standard load balancer with IP addresses" ) if self.decorator_mode == DecoratorMode.UPDATE: - if outbound_type == CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY: + if outbound_type in [ + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY_V2, + ]: if self.mc.agent_pool_profiles is not None and len(self.mc.agent_pool_profiles) > 1: multizoned = False for ap in self.mc.agent_pool_profiles: 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 733eabcddd3..f84639fab49 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 @@ -102,6 +102,9 @@ DecoratorEarlyExitException, DecoratorMode, ) +from azext_aks_preview._consts import ( + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY_V2, +) from dateutil.parser import parse from deepdiff import DeepDiff @@ -4686,6 +4689,22 @@ def test_get_outbound_type(self): expect_outbound_type_4 = CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY self.assertEqual(outbound_type_4,expect_outbound_type_4) + # managedNATGatewayV2 should be preserved, not overwritten to loadBalancer + ctx5 = AKSPreviewManagedClusterContext( + self.cmd, + AKSManagedClusterParamDict( + {"outbound_type": "managedNATGatewayV2"} + ), + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + self.create_attach_agentpool_context(ctx5) + outbound_type_5 = ctx5._get_outbound_type(False, False, None) + self.assertEqual( + outbound_type_5, + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY_V2, + ) + def test_get_enable_gateway_api(self): # default value ctx_1 = AKSPreviewManagedClusterContext( diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 2b7515ea68c..8b2ebbcecdd 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import find_packages, setup -VERSION = "19.0.0b28" +VERSION = "19.0.0b29" CLASSIFIERS = [ "Development Status :: 4 - Beta",