Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 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 @@ -400,6 +400,9 @@
- name: --max-count
type: int
short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --uptime-sla
type: bool
short-summary: Enable a paid managed cluster service with a financially backed SLA.
- name: --load-balancer-managed-outbound-ip-count
type: int
short-summary: Load balancer managed outbound IP count.
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def load_arguments(self, _):
c.argument('update_cluster_autoscaler', options_list=["--update-cluster-autoscaler", "-u"], action='store_true')
c.argument('min_count', type=int, validator=validate_nodes_count)
c.argument('max_count', type=int, validator=validate_nodes_count)
c.argument('uptime_sla', action='store_true')
c.argument('load_balancer_managed_outbound_ip_count', type=int)
c.argument('load_balancer_outbound_ips', type=str, validator=validate_load_balancer_outbound_ips)
c.argument('load_balancer_outbound_ip_prefixes', type=str, validator=validate_load_balancer_outbound_ip_prefixes)
Expand Down
10 changes: 10 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,7 @@ def aks_update(cmd, client, resource_group_name, name,
disable_cluster_autoscaler=False,
update_cluster_autoscaler=False,
min_count=None, max_count=None,
uptime_sla=False,
load_balancer_managed_outbound_ip_count=None,
load_balancer_outbound_ips=None,
load_balancer_outbound_ip_prefixes=None,
Expand All @@ -2134,9 +2135,11 @@ def aks_update(cmd, client, resource_group_name, name,
load_balancer_outbound_ports,
load_balancer_idle_timeout)

# pylint: disable=too-many-boolean-expressions
if (update_autoscaler != 1 and not update_lb_profile and
not attach_acr and
not detach_acr and
not uptime_sla and
api_server_authorized_ip_ranges is None):
raise CLIError('Please specify one or more of "--enable-cluster-autoscaler" or '
'"--disable-cluster-autoscaler" or '
Expand All @@ -2147,6 +2150,7 @@ def aks_update(cmd, client, resource_group_name, name,
'"--load-balancer-outbound-ports" or'
'"--load-balancer-idle-timeout" or'
'"--attach-acr" or "--dettach-acr" or'
'"--uptime-sla" or'
'"--"api-server-authorized-ip-ranges')

instance = client.get(resource_group_name, name)
Expand Down Expand Up @@ -2212,6 +2216,12 @@ def aks_update(cmd, client, resource_group_name, name,
subscription_id=subscription_id,
detach=True)

if uptime_sla:
instance.sku = ManagedClusterSKU(
name="Basic",
tier="Paid"
)

if update_lb_profile:
instance.network_profile.load_balancer_profile = update_load_balancer_profile(
load_balancer_managed_outbound_ip_count,
Expand Down