Skip to content

Commit

Permalink
[AKS] Fix for app routing CLI (#6968)
Browse files Browse the repository at this point in the history
  • Loading branch information
bosesuneha authored Nov 27, 2023
1 parent fa897f8 commit 252de21
Show file tree
Hide file tree
Showing 13 changed files with 2,548 additions and 2,348 deletions.
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ To release a new version, please select a new version number (usually plus 1 to

Pending
+++++++

0.5.172
+++++++
* Fix for regression issue with `az aks create --enable-addon` command for enabling App Routing
* Vendor new SDK and bump API version to 2023-10-02-preview.
* Update the enum for `--os-sku` in command `az aks nodepool update` to only accept the expected Ubuntu and AzureLinux OSSKUs.
* Update description `az aks update` and remove description about outbound ip limit.
Expand Down
27 changes: 7 additions & 20 deletions src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2751,14 +2751,14 @@ def set_up_ingress_web_app_routing(self, mc: ManagedCluster) -> ManagedCluster:
self._ensure_mc(mc)

addons = self.context.get_enable_addons()
if "web_application_routing" in addons:
if "web_application_routing" in addons or self.context.get_enable_app_routing():
if mc.ingress_profile is None:
mc.ingress_profile = self.models.ManagedClusterIngressProfile()
dns_zone_resource_ids = self.context.get_dns_zone_resource_ids()
mc.ingress_profile.web_app_routing = self.models.ManagedClusterIngressProfileWebAppRouting(
enabled=True,
dns_zone_resource_ids=dns_zone_resource_ids,
)
mc.ingress_profile.web_app_routing = self.models.ManagedClusterIngressProfileWebAppRouting(enabled=True)
if "web_application_routing" in addons:
dns_zone_resource_ids = self.context.get_dns_zone_resource_ids()
mc.ingress_profile.web_app_routing.dns_zone_resource_ids = dns_zone_resource_ids

return mc

def set_up_workload_auto_scaler_profile(self, mc: ManagedCluster) -> ManagedCluster:
Expand Down Expand Up @@ -3024,19 +3024,6 @@ def set_up_metrics_profile(self, mc: ManagedCluster) -> ManagedCluster:

return mc

def set_up_app_routing_profile(self, mc: ManagedCluster) -> ManagedCluster:
"""Set up app routing profile for the ManagedCluster object.
:return: the ManagedCluster object
"""
self._ensure_mc(mc)

if self.context.get_enable_app_routing():
if mc.ingress_profile is None:
mc.ingress_profile = self.models.ManagedClusterIngressProfile()
mc.ingress_profile.web_app_routing = self.models.ManagedClusterIngressProfileWebAppRouting(enabled=True)
return mc

def set_up_node_provisioning_mode(self, mc: ManagedCluster) -> ManagedCluster:
self._ensure_mc(mc)

Expand Down Expand Up @@ -3083,7 +3070,7 @@ def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) ->
# set up cluster snapshot
mc = self.set_up_creationdata_of_cluster_snapshot(mc)
# set up app routing profile
mc = self.set_up_app_routing_profile(mc)
mc = self.set_up_ingress_web_app_routing(mc)
# set up workload auto scaler profile
mc = self.set_up_workload_auto_scaler_profile(mc)
# set up vpa
Expand Down
602 changes: 303 additions & 299 deletions ...preview/azext_aks_preview/tests/latest/recordings/test_aks_approuting_enable_disable.yaml
100755 → 100644

Large diffs are not rendered by default.

441 changes: 198 additions & 243 deletions ...ts/latest/recordings/test_aks_approuting_enable_with_keyvault_secrets_provider_addon.yaml
100755 → 100644

Large diffs are not rendered by default.

1,028 changes: 293 additions & 735 deletions src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_approuting_update.yaml
100755 → 100644

Large diffs are not rendered by default.

852 changes: 384 additions & 468 deletions ...w/azext_aks_preview/tests/latest/recordings/test_aks_approuting_zone_add_delete_list.yaml
100755 → 100644

Large diffs are not rendered by default.

592 changes: 277 additions & 315 deletions ...ks-preview/azext_aks_preview/tests/latest/recordings/test_aks_approuting_zone_update.yaml
100755 → 100644

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit 252de21

Please sign in to comment.