Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AKS] Fix the failure of aks update sub-command caused by accidentally passing an empty profile object #3808

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Changes from all 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
5 changes: 2 additions & 3 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1790,10 +1790,9 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches,
raise ArgumentUsageError('--disable-public-fqdn cannot be applied for none mode private dns zone cluster')
instance.api_server_access_profile.enable_private_cluster_public_fqdn = False

if instance.auto_upgrade_profile is None:
instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile()

if auto_upgrade_channel is not None:
if instance.auto_upgrade_profile is None:
instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile()
instance.auto_upgrade_profile.upgrade_channel = auto_upgrade_channel

if not enable_managed_identity and assign_identity:
Expand Down