From 387dd4419d6860d2a69d7398c617074f58cf1148 Mon Sep 17 00:00:00 2001 From: navba-MSFT <57353862+navba-MSFT@users.noreply.github.com> Date: Mon, 11 Jul 2022 17:59:16 +0530 Subject: [PATCH 1/3] {AzureKubernetesService} fixes Azure/azure-cli-extensions#5098 fixes Azure/azure-cli-extensions#5098 az aks addon list command always returns "enable:false" for virtual-node addon. REST API returns "enable:true", but CLI displays result as "enable:false" ``` > az aks addon list -g TestRG -n TestCluster --debug # REST API returns the addon status to be "enabled:true" in debug trace. "addonProfiles": { "aciConnectorLinux": { "enabled": true, <<<<<<< "config": { "SubnetName": "VirtualNodeSubnet" }, #However, CLI displays "enabled:false". It appears to be matching with "aciConnector" instead of "aciConnectorLinux". { "api_key": "aciConnector", "enabled": false, <<<<<<<<< "name": "virtual-node" }, ``` --- src/aks-preview/azext_aks_preview/custom.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index dac9b67dafc..c4a75d96168 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1383,6 +1383,7 @@ def aks_addon_list_available(): def aks_addon_list(cmd, client, resource_group_name, name): mc = client.get(resource_group_name, name) current_addons = [] + os_type = 'Linux' for name, addon_key in ADDONS.items(): # web_application_routing is a special case, the configuration is stored in a separate profile @@ -1402,6 +1403,13 @@ def aks_addon_list(cmd, client, resource_group_name, name): mc.addon_profiles[addon_key].enabled else False ) + if name == "virtual_node": + addon_key += os_type + enabled = ( + True + if addon_key in mc.addon_profiles and mc.addon_profiles[addon_key].enabled + else False + ) current_addons.append({ "name": name, "api_key": addon_key, From 466fa8f12ab2f04e46253b2c590802f7ef4d65ee Mon Sep 17 00:00:00 2001 From: navba-MSFT <57353862+navba-MSFT@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:51:05 +0530 Subject: [PATCH 2/3] Update HISTORY.rst --- src/aks-preview/HISTORY.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index d888a32334d..f80108b39ce 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -10,6 +10,12 @@ 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 the minor of the current latest version number), 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` in `setup.py` with this new version number. Pending ++++++++ +0.5.89 +++++++ + +* Fix for the az aks addon list command to return enable:true, if virtual-node addon is enabled for the AKS cluster. + +++++++ 0.5.88 ++++++ From 4057466f38af6ef5a67b243a2a82a1aad9f7ae91 Mon Sep 17 00:00:00 2001 From: navba-MSFT <57353862+navba-MSFT@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:52:04 +0530 Subject: [PATCH 3/3] Update setup.py --- src/aks-preview/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 844f66f117d..5272a66fb50 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages -VERSION = "0.5.88" +VERSION = "0.5.89" CLASSIFIERS = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers",