Skip to content

Commit

Permalink
{AKS} Fix enabled virtual node addon showing wrong status in `aks add…
Browse files Browse the repository at this point in the history
…on list` (#5099)
  • Loading branch information
navba-MSFT authored Jul 13, 2022
1 parent fd006ce commit b585fdb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
++++++
Expand Down
8 changes: 8 additions & 0 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
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.88"
VERSION = "0.5.89"
CLASSIFIERS = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
Expand Down

0 comments on commit b585fdb

Please sign in to comment.