Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c2e5fe1
add required custom feature headers to improve the recording success …
xmzhao0822 Apr 10, 2024
df82fb2
Merge branch 'Azure:main' into main
xmzhao0822 Apr 15, 2024
1c565bd
Merge remote-tracking branch 'upstream/main'
xmzhao0822 Apr 22, 2024
2131e25
Merge remote-tracking branch 'upstream/main'
xmzhao0822 Apr 23, 2024
5c33512
draft
xmzhao0822 Apr 23, 2024
4155afc
override get_enable_addons and get_enable_msi_auth_for_monitoring
xmzhao0822 Apr 24, 2024
624717e
removed print in the test method
xmzhao0822 Apr 24, 2024
73c9cab
Merge remote-tracking branch 'upstream/main'
xmzhao0822 Apr 24, 2024
c90f25b
run code format and make changes
xmzhao0822 Apr 24, 2024
29f89e1
edit history change and setup.py
xmzhao0822 Apr 24, 2024
205da2e
added AKS-PrometheusAddonPreview to test_aks_command.py
xmzhao0822 Apr 24, 2024
61fa113
updated history notes
xmzhao0822 Apr 24, 2024
a4a62a1
rerun the live test
xmzhao0822 Apr 24, 2024
e8acd3e
rerun test
xmzhao0822 Apr 25, 2024
1bc5b68
updated the comment
xmzhao0822 Apr 25, 2024
d248f8a
fixed merge conflict
xmzhao0822 Apr 25, 2024
08d4557
give new history revision number and remove the test_aks_automatic_sk…
xmzhao0822 Apr 25, 2024
50d963f
Merge branch 'Azure:main' into main
xmzhao0822 Apr 25, 2024
1de4eba
add if logic to enable azure monitor profile when cluster is automatic
xmzhao0822 Apr 29, 2024
32bf6cd
Merge remote-tracking branch 'upstream/main'
xmzhao0822 Apr 29, 2024
8a0d96b
edit history and setup.py
xmzhao0822 Apr 29, 2024
7c0354d
Update src/aks-preview/HISTORY.rst
FumingZhang Apr 29, 2024
b394ac7
Update src/aks-preview/HISTORY.rst
FumingZhang Apr 29, 2024
7d44046
Merge remote-tracking branch 'upstream/main'
xmzhao0822 Apr 29, 2024
9a113fb
solved conflict
xmzhao0822 Apr 29, 2024
ba8e552
update the scenario test case to see the azure monitor metrics is ena…
xmzhao0822 Apr 29, 2024
60d0a34
Update src/aks-preview/HISTORY.rst
FumingZhang Apr 30, 2024
1e1bd85
Update src/aks-preview/setup.py
FumingZhang Apr 30, 2024
c12ac0f
Update src/aks-preview/HISTORY.rst
FumingZhang Apr 30, 2024
3bf027b
Merge branch 'Azure:main' into main
xmzhao0822 Apr 30, 2024
7d79052
Merge branch 'Azure:main' into main
xmzhao0822 May 6, 2024
693bfe5
draft PR to enable disable local accounts to true when sku name is au…
xmzhao0822 May 6, 2024
a5b0ac5
add comments and updated the ut
xmzhao0822 May 6, 2024
4d6b2a8
updated
xmzhao0822 May 6, 2024
4a99da7
run az style
xmzhao0822 May 6, 2024
2b586d9
edit history and setup config
xmzhao0822 May 6, 2024
68168b0
Update src/aks-preview/HISTORY.rst
FumingZhang May 7, 2024
11a1070
Update src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
FumingZhang May 7, 2024
fdfeca5
Merge branch 'Azure:main' into main
xmzhao0822 May 7, 2024
48bac87
Merge branch 'Azure:main' into main
xmzhao0822 May 8, 2024
764e21a
Merge branch 'Azure:main' into main
xmzhao0822 May 14, 2024
a3ed75b
test automatic pipeline
xmzhao0822 May 14, 2024
84ec3ef
updated
xmzhao0822 May 14, 2024
f4e6c39
test adding back disable ssh
xmzhao0822 May 14, 2024
466b5a5
Merge branch 'Azure:main' into main
xmzhao0822 Aug 21, 2024
818cbff
Merge branch 'Azure:main' into main
xmzhao0822 Sep 9, 2024
55738f1
Merge branch 'Azure:main' into main
xmzhao0822 Sep 18, 2024
ecfb84f
Merge branch 'Azure:main' into main
xmzhao0822 Sep 19, 2024
1c24b15
Set node vmsize to empty string when the cluster sku name is automatic
xmzhao0822 Sep 19, 2024
943f401
update comment
xmzhao0822 Sep 20, 2024
c952c77
Merge branch 'Azure:main' into main
xmzhao0822 Sep 20, 2024
569e901
update setup.py and history.rst
xmzhao0822 Sep 20, 2024
6f72af3
Merge branch 'Azure:main' into main
xmzhao0822 Sep 23, 2024
b9933db
add back depend feature flag for update ops
xmzhao0822 Sep 23, 2024
c46eeb4
add disable ssh preview flag to update cmd
xmzhao0822 Sep 23, 2024
df0a0a5
resolve conflict
xmzhao0822 Jan 24, 2025
61d4937
update outbound type logic for automatic sku
xmzhao0822 Jan 24, 2025
4e2fa90
add ut to verify outbound type when sku is automatic and customer spe…
xmzhao0822 Jan 24, 2025
003f01d
updated variable name
xmzhao0822 Jan 24, 2025
148776d
updated syntax
xmzhao0822 Jan 24, 2025
75db004
update the UT for outboundtype
xmzhao0822 Jan 24, 2025
8ffe5b1
updated code to solve api server vnet integration issue
xmzhao0822 Jan 30, 2025
59439c4
adjust outbound type logic
xmzhao0822 Jan 31, 2025
7cddaa6
updated the outbound type selection logic
xmzhao0822 Jan 31, 2025
bed7cdd
Merge remote-tracking branch 'origin/main' into xmzhao/update-outboun…
xmzhao0822 Jan 31, 2025
d52ad82
Merge branch 'Azure:main' into xmzhao/update-outboundtype-automatic
xmzhao0822 Jan 31, 2025
10266db
fix conflict
xmzhao0822 Jan 31, 2025
5d36fda
Merge branch 'xmzhao/update-outboundtype-automatic' of github.com:xmz…
xmzhao0822 Jan 31, 2025
7041a7b
fix conflict
xmzhao0822 Jan 31, 2025
1f1409d
Merge remote-tracking branch 'origin/main' into xmzhao/update-outboun…
xmzhao0822 Feb 3, 2025
81dae89
add UT
xmzhao0822 Feb 4, 2025
60f145d
add UT, edit comments, log version update
xmzhao0822 Feb 4, 2025
4599e29
clean a space
xmzhao0822 Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ If there is no rush to release a new version, please just add a description of t

To release a new version, please select a new version number (usually plus 1 to last patch version, X.Y.Z -> Major.Minor.Patch, more details in `\doc <https://semver.org/>`_), and then add a new section named as the new version number in this file, the content should include the new modifications and everything from the *Pending* section. Finally, update the `VERSION` variable in `setup.py` with this new version number.

13.0.0b3
+++++++
* `az aks create`: Update outbound type selection logic for automatic cluster when customer brings BYO Vnet.

13.0.0b2
+++++++
* `az aks create/update`: Update advanced container networking service (acns) with 2024-09-02-preview API version enablement.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,9 @@ def _get_outbound_type(
):
outbound_type = CONST_OUTBOUND_TYPE_LOAD_BALANCER
skuName = self.get_sku_name()
if skuName is not None and skuName == CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC:
# outbound_type of Automatic SKU should be ManagedNATGateway if not provided.
isVnetSubnetIdEmpty = self.get_vnet_subnet_id() in ["", None]
if skuName is not None and skuName == CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC and isVnetSubnetIdEmpty:
# outbound_type of Automatic SKU should be ManagedNATGateway if no subnet id provided.
outbound_type = CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY

# validation
Expand Down Expand Up @@ -1425,6 +1426,7 @@ def _get_apiserver_subnet_id(self, enable_validation: bool = False) -> Union[str
enable_apiserver_vnet_integration is None or
enable_apiserver_vnet_integration is False
)
and self.get_sku_name() != CONST_MANAGED_CLUSTER_SKU_NAME_AUTOMATIC
):
raise RequiredArgumentMissingError(
'"--apiserver-subnet-id" requires "--enable-apiserver-vnet-integration".')
Expand Down Expand Up @@ -2923,6 +2925,9 @@ def set_up_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster
mc.api_server_access_profile = self.models.ManagedClusterAPIServerAccessProfile()
mc.api_server_access_profile.enable_vnet_integration = True
if self.context.get_apiserver_subnet_id():
if mc.api_server_access_profile is None:
# pylint: disable=no-member
mc.api_server_access_profile = self.models.ManagedClusterAPIServerAccessProfile()
mc.api_server_access_profile.subnet_id = self.context.get_apiserver_subnet_id()

return mc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3958,6 +3958,7 @@ def test_get_outbound_type(self):
self.models,
decorator_mode=DecoratorMode.CREATE,
)
self.create_attach_agentpool_context(ctx1)
outbound_type_1 = ctx1._get_outbound_type(False, False, None)
expect_outbound_type_1 = CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY
self.assertEqual(outbound_type_1,expect_outbound_type_1)
Expand All @@ -3968,10 +3969,33 @@ def test_get_outbound_type(self):
self.models,
decorator_mode=DecoratorMode.CREATE,
)
self.create_attach_agentpool_context(ctx2)
outbound_type_2 = ctx2._get_outbound_type(False, False, None)
expect_outbound_type_2 = CONST_OUTBOUND_TYPE_LOAD_BALANCER
self.assertEqual(outbound_type_2,expect_outbound_type_2)

ctx3 = AKSPreviewManagedClusterContext(
self.cmd,
AKSManagedClusterParamDict({"sku": "automatic", "vnet_subnet_id": "/subscriptions/testid/resourceGroups/MockedResourceGroup/providers/Microsoft.Network/virtualNetworks/MockedNetworkId/subnets/MockedSubNetId"}),
self.models,
decorator_mode=DecoratorMode.CREATE,
)
self.create_attach_agentpool_context(ctx3)
outbound_type_3 = ctx3._get_outbound_type(False, False, None)
expect_outbound_type_3 = CONST_OUTBOUND_TYPE_LOAD_BALANCER
self.assertEqual(outbound_type_3,expect_outbound_type_3)

ctx4 = AKSPreviewManagedClusterContext(
self.cmd,
AKSManagedClusterParamDict({"sku": "automatic"}),
self.models,
decorator_mode=DecoratorMode.CREATE,
)
self.create_attach_agentpool_context(ctx4)
outbound_type_4 = ctx4._get_outbound_type(False, False, None)
expect_outbound_type_4 = CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY
self.assertEqual(outbound_type_4,expect_outbound_type_4)

class AKSPreviewManagedClusterCreateDecoratorTestCase(unittest.TestCase):
def setUp(self):
# manually register CUSTOM_MGMT_AKS_PREVIEW
Expand Down Expand Up @@ -4266,6 +4290,30 @@ def test_set_up_api_server_access_profile(self):
)
self.assertEqual(dec_mc_3, ground_truth_mc_3)

dec_4 = AKSPreviewManagedClusterCreateDecorator(
self.cmd,
self.client,
{
"apiserver_subnet_id": apiserver_subnet_id,
"vnet_subnet_id": vnet_subnet_id,
"sku": "automatic",
},
CUSTOM_MGMT_AKS_PREVIEW,
)
mc_4 = self.models.ManagedCluster(location="test_location")
dec_4.context.attach_mc(mc_4)
dec_mc_4 = dec_4.set_up_api_server_access_profile(mc_4)
ground_truth_api_server_access_profile_4 = (
self.models.ManagedClusterAPIServerAccessProfile(
subnet_id=apiserver_subnet_id,
)
)
ground_truth_mc_4 = self.models.ManagedCluster(
location="test_location",
api_server_access_profile=ground_truth_api_server_access_profile_4,
)
self.assertEqual(dec_mc_4, ground_truth_mc_4)

def test_build_gitops_addon_profile(self):
# default
dec_1 = AKSPreviewManagedClusterCreateDecorator(
Expand Down
2 changes: 1 addition & 1 deletion src/aks-preview/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from setuptools import setup, find_packages

VERSION = "13.0.0b2"
VERSION = "13.0.0b3"

CLASSIFIERS = [
"Development Status :: 4 - Beta",
Expand Down