Skip to content

Commit c7f31bd

Browse files
authored
Add support for node public IP prefix ID (Azure#17138)
1 parent aca6de4 commit c7f31bd

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

linter_exclusions.yml

+6
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ aks create:
223223
enable_node_public_ip:
224224
rule_exclusions:
225225
- option_length_too_long
226+
node_public_ip_prefix_id:
227+
rule_exclusions:
228+
- option_length_too_long
226229
enable_private_cluster:
227230
rule_exclusions:
228231
- option_length_too_long
@@ -271,6 +274,9 @@ aks nodepool add:
271274
enable_node_public_ip:
272275
rule_exclusions:
273276
- option_length_too_long
277+
node_public_ip_prefix_id:
278+
rule_exclusions:
279+
- option_length_too_long
274280
aks update:
275281
parameters:
276282
aad_admin_group_object_ids:

src/azure-cli/azure/cli/command_modules/acs/_help.py

+6
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@
364364
- name: --enable-node-public-ip
365365
type: bool
366366
short-summary: Enable VMSS node public IP.
367+
- name: --node-public-ip-prefix-id
368+
type: string
369+
short-summary: Public IP prefix ID used to assign public IPs to VMSS nodes.
367370
- name: --workspace-resource-id
368371
type: string
369372
short-summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one.
@@ -700,6 +703,9 @@
700703
- name: --enable-node-public-ip
701704
type: bool
702705
short-summary: Enable VMSS node public IP.
706+
- name: --node-public-ip-prefix-id
707+
type: string
708+
short-summary: Public IP prefix ID used to assign public IPs to VMSS nodes.
703709
- name: --vnet-subnet-id
704710
type: string
705711
short-summary: The ID of a subnet in an existing VNet into which to deploy the cluster.

src/azure-cli/azure/cli/command_modules/acs/_params.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ def load_arguments(self, _):
211211
c.argument('enable_managed_identity', action='store_true')
212212
c.argument('assign_identity', type=str, validator=validate_assign_identity)
213213
c.argument('nodepool_labels', nargs='*', validator=validate_nodepool_labels, help='space-separated labels: key[=value] [key[=value] ...]. You can not change the node labels through CLI after creation. See https://aka.ms/node-labels for syntax of labels.')
214-
c.argument('enable_node_public_ip', action='store_true', is_preview=True)
214+
c.argument('enable_node_public_ip', action='store_true')
215+
c.argument('node_public_ip_prefix_id', type=str)
215216
c.argument('windows_admin_username', options_list=['--windows-admin-username'])
216217
c.argument('windows_admin_password', options_list=['--windows-admin-password'])
217218
c.argument('enable_ahub', options_list=['--enable-ahub'])
@@ -314,7 +315,8 @@ def load_arguments(self, _):
314315
c.argument('tags', tags_type)
315316
c.argument('labels', nargs='*', validator=validate_nodepool_labels)
316317
c.argument('mode', get_enum_type(nodepool_mode_type))
317-
c.argument('enable_node_public_ip', action='store_true', is_preview=True)
318+
c.argument('enable_node_public_ip', action='store_true')
319+
c.argument('node_public_ip_prefix_id', type=str)
318320
c.argument('ppg', type=str, validator=validate_ppg)
319321
c.argument('max_surge', type=str, validator=validate_max_surge)
320322
c.argument('node_os_disk_type', arg_type=get_enum_type([CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL]))

src/azure-cli/azure/cli/command_modules/acs/custom.py

+4
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
18801880
tags=None,
18811881
zones=None,
18821882
enable_node_public_ip=False,
1883+
node_public_ip_prefix_id=None,
18831884
generate_ssh_keys=False, # pylint: disable=unused-argument
18841885
api_server_authorized_ip_ranges=None,
18851886
enable_private_cluster=False,
@@ -1923,6 +1924,7 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
19231924
proximity_placement_group_id=ppg,
19241925
availability_zones=zones,
19251926
enable_node_public_ip=enable_node_public_ip,
1927+
node_public_ip_prefix_id=node_public_ip_prefix_id,
19261928
max_pods=int(max_pods) if max_pods else None,
19271929
type=vm_set_type,
19281930
mode="System"
@@ -3357,6 +3359,7 @@ def aks_agentpool_add(cmd, client, resource_group_name, cluster_name, nodepool_n
33573359
kubernetes_version=None,
33583360
zones=None,
33593361
enable_node_public_ip=False,
3362+
node_public_ip_prefix_id=None,
33603363
node_vm_size=None,
33613364
node_osdisk_type=None,
33623365
node_osdisk_size=0,
@@ -3418,6 +3421,7 @@ def aks_agentpool_add(cmd, client, resource_group_name, cluster_name, nodepool_n
34183421
availability_zones=zones,
34193422
scale_set_priority=priority,
34203423
enable_node_public_ip=enable_node_public_ip,
3424+
node_public_ip_prefix_id=node_public_ip_prefix_id,
34213425
node_taints=taints_array,
34223426
upgrade_settings=upgradeSettings,
34233427
mode=mode

0 commit comments

Comments
 (0)