Skip to content

Commit

Permalink
{AKS} Keep aad profile in PUT request of ManagedCluster (#4638)
Browse files Browse the repository at this point in the history
* keep aad profile in upgrade

* add new version

* fix addon commands

* update history
  • Loading branch information
FumingZhang authored Apr 7, 2022
1 parent 420c82d commit f2b1fb8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
12 changes: 12 additions & 0 deletions src/aks-preview/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Release History
===============

0.5.60
++++++

* BugFix: Keep aad profile in PUT request of ManagedCluster. Modified commands are
* `az aks scale`
* `az aks upgrade`
* `az aks enable-addons`
* `az aks disable-addons`
* `az aks addon enable`
* `az aks addon disable`
* `az aks addon update`

0.5.59
++++++

Expand Down
3 changes: 1 addition & 2 deletions src/aks-preview/azext_aks_preview/addonconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements

instance.addon_profiles = addon_profiles

# null out the SP and AAD profile because otherwise validation complains
# null out the SP profile because otherwise validation complains
instance.service_principal_profile = None
instance.aad_profile = None

return instance

Expand Down
9 changes: 3 additions & 6 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,9 +1191,8 @@ def aks_scale(cmd, # pylint: disable=unused-argument
"Cannot scale cluster autoscaler enabled node pool.")

agent_profile.count = int(node_count) # pylint: disable=no-member
# null out the SP and AAD profile because otherwise validation complains
# null out the SP profile because otherwise validation complains
instance.service_principal_profile = None
instance.aad_profile = None
return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance)
raise CLIError('The nodepool "{}" was not found.'.format(nodepool_name))

Expand Down Expand Up @@ -1282,9 +1281,8 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state
agent_profile.orchestrator_version = kubernetes_version
agent_profile.creation_data = None

# null out the SP and AAD profile because otherwise validation complains
# null out the SP profile because otherwise validation complains
instance.service_principal_profile = None
instance.aad_profile = None

headers = get_aks_custom_headers(aks_custom_headers)

Expand Down Expand Up @@ -2292,9 +2290,8 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements

instance.addon_profiles = addon_profiles

# null out the SP and AAD profile because otherwise validation complains
# null out the SP profile because otherwise validation complains
instance.service_principal_profile = None
instance.aad_profile = None

return instance

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.59"
VERSION = "0.5.60"
CLASSIFIERS = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
Expand Down

0 comments on commit f2b1fb8

Please sign in to comment.