Skip to content

Commit 4e94492

Browse files
committed
Address comments
1 parent 669c082 commit 4e94492

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/aks-preview/azext_aks_preview/managed_cluster_decorator.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5236,6 +5236,9 @@ def update_agentpool_profile(self, mc: ManagedCluster) -> ManagedCluster:
52365236

52375237
# Preview-specific change: an AKS ManagedCluster of automatic
52385238
# cluster with hosted system components may not have agent pools
5239+
# When transitioning from hosted to non-hosted automatic clusters,
5240+
# customers must first add a system node pool before disabling
5241+
# the hosted system profile.
52395242
if not mc.agent_pool_profiles:
52405243
if mc.hosted_system_profile and mc.hosted_system_profile.enabled:
52415244
return mc
@@ -6580,21 +6583,6 @@ def update_upgrade_settings(self, mc: ManagedCluster) -> ManagedCluster:
65806583

65816584
return mc
65826585

6583-
def update_nodepool_taints_mc(self, mc: ManagedCluster) -> ManagedCluster:
6584-
self._ensure_mc(mc)
6585-
6586-
# update nodepool taints for all nodepools
6587-
nodepool_taints = self.context.get_nodepool_taints()
6588-
if nodepool_taints is not None:
6589-
if not mc.agent_pool_profiles:
6590-
raise UnknownError(
6591-
"Encounter an unexpected error while getting agent pool profiles from the "
6592-
"cluster in the process of updating agentpool profile."
6593-
)
6594-
for agent_profile in mc.agent_pool_profiles:
6595-
agent_profile.node_taints = nodepool_taints
6596-
return mc
6597-
65986586
def update_nodepool_initialization_taints_mc(self, mc: ManagedCluster) -> ManagedCluster:
65996587
self._ensure_mc(mc)
66006588

@@ -7301,8 +7289,6 @@ def update_mc_profile_preview(self) -> ManagedCluster:
73017289
mc = self.update_auto_upgrade_profile(mc)
73027290
# update cluster upgrade settings profile
73037291
mc = self.update_upgrade_settings(mc)
7304-
# update nodepool taints
7305-
mc = self.update_nodepool_taints_mc(mc)
73067292
# update nodepool initialization taints
73077293
mc = self.update_nodepool_initialization_taints_mc(mc)
73087294
# update acns in network_profile

0 commit comments

Comments
 (0)