Skip to content

Commit

Permalink
Revert "[ACS] az aks create/update: Add parameter `--auto-upgrade-c…
Browse files Browse the repository at this point in the history
…hannel` to support auto upgrade (Azure#18825)"

This reverts commit 6918b29.
  • Loading branch information
FumingZhang committed Aug 20, 2021
1 parent 4ac5e36 commit d7cc707
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 1,159 deletions.
6 changes: 0 additions & 6 deletions src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,6 @@
type: string
short-summary: How outbound traffic will be configured for a cluster.
long-summary: Select between loadBalancer and userDefinedRouting. If not set, defaults to type loadBalancer. Requires --vnet-subnet-id to be provided with a preconfigured route table and --load-balancer-sku to be Standard.
- name: --auto-upgrade-channel
type: string
short-summary: Specify the upgrade channel for autoupgrade.
- name: --enable-cluster-autoscaler
type: bool
short-summary: Enable cluster autoscaler, default value is false.
Expand Down Expand Up @@ -549,9 +546,6 @@
type: int
short-summary: Load balancer idle timeout in minutes.
long-summary: Desired idle timeout for load balancer outbound flows, default is 30 minutes. Please specify a value in the range of [4, 100].
- name: --auto-upgrade-channel
type: string
short-summary: Specify the upgrade channel for autoupgrade.
- name: --attach-acr
type: string
short-summary: Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.
Expand Down
10 changes: 0 additions & 10 deletions src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@
"westus",
]

auto_upgrade_channels = [
"rapid",
"stable",
"patch",
"node-image",
"none"
]

storage_profile_types = ["StorageAccount", "ManagedDisks"]
nodepool_mode_type = ["System", "User"]

Expand Down Expand Up @@ -211,7 +203,6 @@ def load_arguments(self, _):
validator=validate_load_balancer_idle_timeout)
c.argument('outbound_type', arg_type=get_enum_type([CONST_OUTBOUND_TYPE_LOAD_BALANCER,
CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING]))
c.argument('auto_upgrade_channel', arg_type=get_enum_type(auto_upgrade_channels))
c.argument('enable_cluster_autoscaler', action='store_true')
c.argument('cluster_autoscaler_profile', nargs='+', options_list=["--cluster-autoscaler-profile", "--ca-profile"], validator=validate_cluster_autoscaler_profile,
help="Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.")
Expand Down Expand Up @@ -305,7 +296,6 @@ def load_arguments(self, _):
validator=validate_load_balancer_outbound_ports)
c.argument('load_balancer_idle_timeout', type=int,
validator=validate_load_balancer_idle_timeout)
c.argument('auto_upgrade_channel', arg_type=get_enum_type(auto_upgrade_channels))
c.argument('api_server_authorized_ip_ranges',
type=str, validator=validate_ip_ranges)
c.argument('enable_ahub', options_list=['--enable-ahub'])
Expand Down
23 changes: 1 addition & 22 deletions src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,6 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
load_balancer_outbound_ports=None,
load_balancer_idle_timeout=None,
outbound_type=None,
auto_upgrade_channel=None,
enable_addons=None,
workspace_resource_id=None,
vnet_subnet_id=None,
Expand Down Expand Up @@ -2100,9 +2099,6 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
ManagedClusterAADProfile = cmd.get_models('ManagedClusterAADProfile',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ManagedClusterAutoUpgradeProfile = cmd.get_models('ManagedClusterAutoUpgradeProfile',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ManagedClusterAgentPoolProfile = cmd.get_models('ManagedClusterAgentPoolProfile',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
Expand Down Expand Up @@ -2433,10 +2429,6 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
cluster_identity_object_id,
assign_kubelet_identity)

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

mc = ManagedCluster(
location=location,
tags=tags,
Expand All @@ -2454,8 +2446,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
api_server_access_profile=api_server_access_profile,
identity=identity,
disk_encryption_set_id=node_osdisk_diskencryptionset_id,
identity_profile=identity_profile,
auto_upgrade_profile=auto_upgrade_profile
identity_profile=identity_profile
)

use_custom_private_dns_zone = False
Expand Down Expand Up @@ -2763,7 +2754,6 @@ def aks_update(cmd, client, resource_group_name, name,
enable_ahub=False,
disable_ahub=False,
windows_admin_password=None,
auto_upgrade_channel=None,
enable_managed_identity=False,
assign_identity=None,
yes=False,
Expand All @@ -2776,9 +2766,6 @@ def aks_update(cmd, client, resource_group_name, name,
ManagedClusterAADProfile = cmd.get_models('ManagedClusterAADProfile',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ManagedClusterAutoUpgradeProfile = cmd.get_models('ManagedClusterAutoUpgradeProfile',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ManagedClusterIdentity = cmd.get_models('ManagedClusterIdentity',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
Expand Down Expand Up @@ -2808,7 +2795,6 @@ def aks_update(cmd, client, resource_group_name, name,
not update_aad_profile and
not enable_ahub and
not disable_ahub and
not auto_upgrade_channel and
not windows_admin_password and
not enable_managed_identity and
not assign_identity):
Expand All @@ -2821,7 +2807,6 @@ def aks_update(cmd, client, resource_group_name, name,
'"--load-balancer-outbound-ip-prefixes" or'
'"--load-balancer-outbound-ports" or'
'"--load-balancer-idle-timeout" or'
'"--auto-upgrade-channel" or '
'"--attach-acr" or "--detach-acr" or'
'"--uptime-sla" or'
'"--no-uptime-sla" or '
Expand Down Expand Up @@ -2983,12 +2968,6 @@ def aks_update(cmd, client, resource_group_name, name,
if disable_ahub:
instance.windows_profile.license_type = 'None'

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

if auto_upgrade_channel is not None:
instance.auto_upgrade_profile.upgrade_channel = auto_upgrade_channel

if windows_admin_password:
instance.windows_profile.admin_password = windows_admin_password

Expand Down
Loading

0 comments on commit d7cc707

Please sign in to comment.