Skip to content

Commit 20eb061

Browse files
authored
[AKS] az aks create --enable-hosted-system won't create default systempool (#9331)
1 parent 5f723a7 commit 20eb061

File tree

6 files changed

+8629
-981
lines changed

6 files changed

+8629
-981
lines changed

src/aks-preview/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ To release a new version, please select a new version number (usually plus 1 to
1111

1212
Pending
1313
+++++++
14+
15+
19.0.0b9
16+
+++++++
17+
* `az aks create --enable-hosted-system`: no longer provision default system node pool when creating an automatic cluster with hosted system enabled.
1418
* `az aks machine update`: Add support for updating machine tags, node taints and node labels.
1519
* Fix `az aks bastion` subshell defaulting to cmd on Windows when invoked from PowerShell by implementing grandparent process detection to identify the actual user shell.
1620

src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"test_aks_nodepool_add_with_workload_runtime"
3232
],
3333
"automatic, no quota": [
34-
"test_aks_automatic_sku"
34+
"test_aks_automatic_sku",
35+
"test_aks_automatic_sku_with_hosted_system_enabled"
3536
],
3637
"maxBlockedNodes, missing feature registration & toggle": [
3738
"test_aks_nodepool_max_blocked_nodes"

src/aks-preview/azext_aks_preview/managed_cluster_decorator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4710,6 +4710,10 @@ def set_up_enable_hosted_components(self, mc: ManagedCluster) -> ManagedCluster:
47104710
mc.hosted_system_profile = self.models.ManagedClusterHostedSystemProfile() # pylint: disable=no-member
47114711
mc.hosted_system_profile.enabled = True
47124712

4713+
# Remove default agent pool profiles when hosted system profile is enabled
4714+
if mc.agent_pool_profiles is not None:
4715+
mc.agent_pool_profiles = None
4716+
47134717
return mc
47144718

47154719
# pylint: disable=unused-argument
@@ -4779,6 +4783,7 @@ def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) ->
47794783
# set up user-defined scheduler configuration for kube-scheduler upstream
47804784
mc = self.set_up_upstream_kubescheduler_user_configuration(mc)
47814785
# set up enable hosted components
4786+
# enabling hosted components will remove the default agent pool profiles from the mc object
47824787
mc = self.set_up_enable_hosted_components(mc)
47834788

47844789
# validate the azure cli core version

0 commit comments

Comments
 (0)