Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c662843
implementedCodeFromPreviousPRs
Jul 13, 2021
b30dd37
adding ManagedClusterAutoUpgradeProfile code
Jul 14, 2021
c8ed48e
adding test record
Jul 15, 2021
c00c905
Fix linter failures (#19116) (#19147)
zhoxing-ms Aug 6, 2021
71456b1
Handle unsupported and no_effect change types (#19144)
shenglol Aug 6, 2021
ed4e903
[Batch] Upgrade api-version to v2021-06-01 (#19100)
cRui861 Aug 7, 2021
da3ff65
{Release} Hotfix: Release 2.27.1 (#19187)
zhoxing-ms Aug 11, 2021
1b21016
change to direct enums
charliedmcb Aug 12, 2021
0a925aa
fixing PR comments
Aug 12, 2021
c7f92e3
change to auto_upgrade_channels
Aug 12, 2021
4121a33
Merge branch 'master' into charliedmcb/addingAutoupgraderToCLI
Aug 12, 2021
c1affbf
test_aks_create_with_auto_upgrade_channel
Aug 12, 2021
f6a3be7
Revert "test_aks_create_with_auto_upgrade_channel"
Aug 15, 2021
ec9cd69
Revert "Merge branch 'master' into charliedmcb/addingAutoupgraderToCLI"
Aug 15, 2021
e5985c3
Revert "Revert "Merge branch 'master' into charliedmcb/addingAutoupgr…
Aug 15, 2021
0ef331c
Revert "Merge branch 'master' into charliedmcb/addingAutoupgraderToCLI"
Aug 15, 2021
cd47cb0
Revert "Revert "Merge branch 'master' into charliedmcb/addingAutoupgr…
Aug 15, 2021
8d8f80f
Revert "Revert "Revert "Merge branch 'master' into charliedmcb/adding…
Aug 15, 2021
fb05ee7
Revert "Revert "Revert "Revert "Merge branch 'master' into charliedmc…
Aug 15, 2021
effe159
Revert "Handle unsupported and no_effect change types (#19144)"
Aug 15, 2021
33c2f04
Revert "Revert "Handle unsupported and no_effect change types (#19144)""
Aug 15, 2021
0df7c06
Revert "{Release} Hotfix: Release 2.27.1 (#19187)"
Aug 15, 2021
8aa3f09
Revert "[Batch] Upgrade api-version to v2021-06-01 (#19100)"
Aug 15, 2021
dbca938
Revert "Handle unsupported and no_effect change types (#19144)"
Aug 15, 2021
432f0ee
Merge remote-tracking branch 'origin' into charliedmcb/addingAutoupgr…
Aug 15, 2021
49ef3ad
running new test
Aug 15, 2021
eb0e57f
remove yaml
Aug 15, 2021
90c3952
ran test
Aug 16, 2021
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
6 changes: 6 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@
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 @@ -546,6 +549,9 @@
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: 10 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
"westus",
]

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

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

Expand Down Expand Up @@ -203,6 +211,7 @@ 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 @@ -296,6 +305,7 @@ 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: 22 additions & 1 deletion src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,7 @@ 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 @@ -2098,6 +2099,9 @@ 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 @@ -2428,6 +2432,10 @@ 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 @@ -2445,7 +2453,8 @@ 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
identity_profile=identity_profile,
auto_upgrade_profile=auto_upgrade_profile
)

use_custom_private_dns_zone = False
Expand Down Expand Up @@ -2753,6 +2762,7 @@ 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 @@ -2765,6 +2775,9 @@ 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 @@ -2794,6 +2807,7 @@ 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 @@ -2806,6 +2820,7 @@ 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 @@ -2967,6 +2982,12 @@ 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