Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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 @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
++++++

0.5.149
+++++++
* `az aks addon update`: Fix unexpected error 'Addon "web_application_routing" is not enabled in this cluster' when trying to update the web app routing addon for an managed cluster that already has it enabled.

0.5.148
+++++++
* Add support for option --nodepool-taints to some aks commands
Expand Down
2 changes: 1 addition & 1 deletion src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ def aks_addon_update(cmd, client, resource_group_name, name, addon, workspace_re
if (instance.ingress_profile is None) or (instance.ingress_profile.web_app_routing is None) or not instance.ingress_profile.web_app_routing.enabled:
raise InvalidArgumentValueError(f'Addon "{addon}" is not enabled in this cluster.')

if addon == "monitoring" and enable_msi_auth_for_monitoring is None:
elif addon == "monitoring" and enable_msi_auth_for_monitoring is None:
enable_msi_auth_for_monitoring = True

else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6089,6 +6089,43 @@ def test_aks_disable_addon_web_app_routing(self, resource_group, resource_group_
# self.check('ingressProfile.webAppRouting.enabled', False)
])

@AllowLargeResponse()
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
def test_aks_create_and_update_web_application_routing_dns_zone(self, resource_group, resource_group_location):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queued live test pipeline to validate the change.

@FumingZhang FumingZhang Jul 13, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's regression on command az network dns zone (see issue #26813), so mark the case as @live_only() as a temporary workaround. Will tune the case later once the regression is fixed.

aks_name = self.create_random_name('cliakstest', 16)
dns_zone_name = self.create_random_name('cliakstest', 16)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'dns_zone_name': dns_zone_name,
'ssh_key_value': self.generate_ssh_keys()
})

create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
'-a web_application_routing --ssh-key-value={ssh_key_value} -o json'
mc = self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded'),
self.check('ingressProfile.webAppRouting.enabled', True),
]).get_output_in_json()
web_app_routing_identity_obj_id = mc["ingressProfile"]["webAppRouting"]["identity"]["objectId"]

create_dns_zone_cmd = 'network dns zone create -g {resource_group} -n {dns_zone_name}'
dns_zone = self.cmd(create_dns_zone_cmd,checks=[
self.check('provisioningState', 'Succeeded'),
]).get_output_in_json()
assert dns_zone['provisioningState'] == 'Succeeded'
dns_zone_id = dns_zone['id']

self.kwargs.update({ 'web_app_routing_identity_obj_id': web_app_routing_identity_obj_id, 'dns_zone_id': dns_zone_id })

role_assignment_cmd = 'role assignment create --role "DNS Zone Contributor" --assignee {web_app_routing_identity_obj_id} --scope {dns_zone_id}'
self.cmd(role_assignment_cmd)

addon_update_cmd = 'aks addon update -g {resource_group} -n {name} --addon web_application_routing --dns-zone-resource-id={dns_zone_id}'
self.cmd(addon_update_cmd, checks=[
self.check('provisioningState', 'Succeeded')
])

@AllowLargeResponse()
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
def test_aks_create_with_keda(self, resource_group, resource_group_location):
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 = "0.5.148"
VERSION = "0.5.149"

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