Skip to content

Commit 11ffb93

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-cli into add-tag-for-public-ip
2 parents 14a0b4d + 37dfc67 commit 11ffb93

29 files changed

+4888
-376
lines changed

.github/policies/resourceManagement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ configuration:
231231
then:
232232
- mentionUsers:
233233
mentionees:
234-
- mbifeld
234+
- dyu1208
235235
- FumingZhang
236236
- andyliuliming
237237
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.

src/azure-cli/azure/cli/command_modules/acr/_breaking_change.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,25 @@
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
55

6-
from azure.cli.core.breaking_change import register_output_breaking_change
6+
from azure.cli.core.breaking_change import register_output_breaking_change, register_command_group_deprecate
77

88
register_output_breaking_change(command_name='acr login',
99
description='Exit code will be 1 if command fails for docker login')
10+
11+
helm_bc_msg = 'In November 2020, Helm 2 reached end of life. ' \
12+
'Starting on March 30th, 2025 Azure Container Registry will no longer support Helm 2. ' \
13+
'Therefore, the legacy "Helm repositories" functionality will also be retired. ' \
14+
'We recommend that you transition to Helm 3 immediately.\n' \
15+
'Starting January 21st, 2025 the CLI command `az acr helm push` was retired to ' \
16+
'prevent pushing new Helm charts to legacy Helm repositories.\n' \
17+
'Starting March 30th, 2025 the CLI command group `az acr helm` was retired, ' \
18+
'ending all legacy Helm repository capabilities in Azure Container Registry.\n' \
19+
'All Helm charts not stored as an OCI artifact ' \
20+
'was deleted from Azure Container Registry on March 30th, 2025.\n' \
21+
'Learn how to find all Helm charts stored in a Helm repository here: `az acr helm list`. ' \
22+
'If the Helm chart you are using is listed ' \
23+
'then it is stored in a legacy Helm repository and is at risk of deletion.\n' \
24+
'For more information on managing and deploying applications for Kubernetes, ' \
25+
'see https://aka.ms/acr/helm.'
26+
register_command_group_deprecate(command_group='acr helm', redirect='Helm v3 commands', message=helm_bc_msg,
27+
target_version='Sept 30th, 2025')

src/azure-cli/azure/cli/command_modules/acr/commands.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -360,24 +360,13 @@ def load_command_table(self, _):
360360
g.show_command('show', 'acr_config_authentication_as_arm_show')
361361
g.command('update', 'acr_config_authentication_as_arm_update')
362362

363-
def _helm_deprecate_message(self):
364-
msg = "This {} has been deprecated and will be removed in future release.".format(self.object_type)
365-
msg += " Use '{}' instead.".format(self.redirect)
366-
msg += " Learn more about storing Helm charts at"
367-
msg += " https://aka.ms/acr/helm"
368-
return msg
369-
370-
helm_deprecate_info = self.deprecate(redirect="Helm v3 commands", message_func=_helm_deprecate_message)
371-
372-
with self.command_group('acr helm', acr_helm_util, deprecate_info=helm_deprecate_info) as g:
373-
g.command('list', 'acr_helm_list', table_transformer=helm_list_output_format,
374-
deprecate_info=helm_deprecate_info)
375-
g.show_command('show', 'acr_helm_show', table_transformer=helm_show_output_format,
376-
deprecate_info=helm_deprecate_info)
377-
g.command('delete', 'acr_helm_delete', deprecate_info=helm_deprecate_info)
378-
g.command('push', 'acr_helm_push', deprecate_info=helm_deprecate_info)
379-
g.command('repo add', 'acr_helm_repo_add', deprecate_info=helm_deprecate_info)
380-
g.command('install-cli', 'acr_helm_install_cli', is_preview=True, deprecate_info=helm_deprecate_info)
363+
with self.command_group('acr helm', acr_helm_util) as g:
364+
g.command('list', 'acr_helm_list', table_transformer=helm_list_output_format)
365+
g.show_command('show', 'acr_helm_show', table_transformer=helm_show_output_format)
366+
g.command('delete', 'acr_helm_delete')
367+
g.command('push', 'acr_helm_push')
368+
g.command('repo add', 'acr_helm_repo_add')
369+
g.command('install-cli', 'acr_helm_install_cli', is_preview=True)
381370

382371
with self.command_group('acr network-rule', acr_network_rule_util) as g:
383372
g.command('list', 'acr_network_rule_list')

src/azure-cli/azure/cli/command_modules/acr/tests/latest/taskfilesample.yaml renamed to src/azure-cli/azure/cli/command_modules/acr/tests/latest/data/taskfilesample.yaml

File renamed without changes.

src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_task.yaml

Lines changed: 252 additions & 304 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_task_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_acr_task(self, resource_group):
2828
'trigger_enabled': 'False',
2929
'identity': '[system]',
3030
'loginServer': 'test.acr.com',
31-
'file_path': os.path.join(curr_dir, 'taskfilesample.yaml').replace('\\', '\\\\')
31+
'file_path': os.path.join(curr_dir, 'data//taskfilesample.yaml').replace('\\', '\\\\')
3232
})
3333
self.cmd('acr create -n {registry_name} -g {rg} -l {rg_loc} --sku {sku}',
3434
checks=[self.check('name', '{registry_name}'),

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
CONST_GPU_INSTANCE_PROFILE_MIG4_G = "MIG4g"
5454
CONST_GPU_INSTANCE_PROFILE_MIG7_G = "MIG7g"
5555

56+
# gpu driver install
57+
CONST_GPU_DRIVER_INSTALL = "Install"
58+
CONST_GPU_DRIVER_NONE = "None"
59+
5660
# consts for ManagedCluster
5761
# load balancer sku
5862
CONST_LOAD_BALANCER_SKU_BASIC = "basic"

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@
435435
- name: --k8s-support-plan
436436
type: string
437437
short-summary: Choose from "KubernetesOfficial" or "AKSLongTermSupport", with "AKSLongTermSupport" you get 1 extra year of CVE patchs.
438+
- name: --ca-certs --custom-ca-trust-certificates
439+
type: string
440+
short-summary: Path to a file containing up to 10 blank line separated certificates. Only valid for Linux nodes.
441+
long-summary: These certificates are used by Custom CA Trust feature and will be added to trust stores of nodes.
438442
- name: --enable-defender
439443
type: bool
440444
short-summary: Enable Microsoft Defender security profile.
@@ -865,6 +869,10 @@
865869
- name: --disable-defender
866870
type: bool
867871
short-summary: Disable defender profile.
872+
- name: --ca-certs --custom-ca-trust-certificates
873+
type: string
874+
short-summary: Path to a file containing up to 10 blank line separated certificates. Only valid for Linux nodes.
875+
long-summary: These certificates are used by Custom CA Trust feature and will be added to trust stores of nodes.
868876
- name: --defender-config
869877
type: string
870878
short-summary: Path to JSON file containing Microsoft Defender profile configurations.
@@ -1663,6 +1671,9 @@
16631671
- name: --if-none-match
16641672
type: string
16651673
short-summary: Set to '*' to allow a new agentpool to be created, but to prevent updating an existing agentpool. Other values will be ignored.
1674+
- name: --gpu-driver
1675+
type: string
1676+
short-summary: Whether to install driver for GPU node pool. Possible values are "Install" or "None". Default is "Install".
16661677
16671678
examples:
16681679
- name: Create a nodepool in an existing AKS cluster with ephemeral os enabled.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
CONST_GPU_INSTANCE_PROFILE_MIG1_G, CONST_GPU_INSTANCE_PROFILE_MIG2_G,
1717
CONST_GPU_INSTANCE_PROFILE_MIG3_G, CONST_GPU_INSTANCE_PROFILE_MIG4_G,
1818
CONST_GPU_INSTANCE_PROFILE_MIG7_G, CONST_LOAD_BALANCER_SKU_BASIC,
19+
CONST_GPU_DRIVER_INSTALL, CONST_GPU_DRIVER_NONE,
1920
CONST_LOAD_BALANCER_SKU_STANDARD, CONST_MANAGED_CLUSTER_SKU_TIER_FREE,
2021
CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM,
2122
CONST_NETWORK_DATAPLANE_AZURE, CONST_NETWORK_DATAPLANE_CILIUM,
@@ -104,6 +105,7 @@
104105
validate_crg_id,
105106
validate_azure_service_mesh_revision,
106107
validate_message_of_the_day,
108+
validate_custom_ca_trust_certificates,
107109
validate_bootstrap_container_registry_resource_id)
108110
from azure.cli.core.commands.parameters import (
109111
edge_zone_type, file_type, get_enum_type,
@@ -193,6 +195,11 @@
193195
CONST_GPU_INSTANCE_PROFILE_MIG7_G,
194196
]
195197

198+
gpu_driver_install_modes = [
199+
CONST_GPU_DRIVER_INSTALL,
200+
CONST_GPU_DRIVER_NONE
201+
]
202+
196203
nrg_lockdown_restriction_levels = [
197204
CONST_NRG_LOCKDOWN_RESTRICTION_LEVEL_READONLY,
198205
CONST_NRG_LOCKDOWN_RESTRICTION_LEVEL_UNRESTRICTED,
@@ -375,6 +382,7 @@ def load_arguments(self, _):
375382
c.argument('enable_image_cleaner', action='store_true')
376383
c.argument('image_cleaner_interval_hours', type=int)
377384
c.argument('http_proxy_config')
385+
c.argument('custom_ca_trust_certificates', options_list=["--custom-ca-trust-certificates", "--ca-certs"], help="path to file containing list of new line separated CAs")
378386
c.argument('enable_keda', action='store_true')
379387
c.argument('enable_vpa', action='store_true', help='enable vertical pod autoscaler for cluster')
380388
c.argument('enable_azure_service_mesh',
@@ -574,6 +582,7 @@ def load_arguments(self, _):
574582
c.argument('disable_image_cleaner', action='store_true', validator=validate_image_cleaner_enable_disable_mutually_exclusive)
575583
c.argument('image_cleaner_interval_hours', type=int)
576584
c.argument('http_proxy_config')
585+
c.argument('custom_ca_trust_certificates', options_list=["--custom-ca-trust-certificates", "--ca-certs"], validator=validate_custom_ca_trust_certificates, help="path to file containing list of new line separated CAs")
577586
c.argument('enable_keda', action='store_true')
578587
c.argument('disable_keda', action='store_true')
579588
c.argument('enable_vpa', action='store_true', help='enable vertical pod autoscaler for cluster')
@@ -825,6 +834,7 @@ def load_arguments(self, _):
825834
c.argument('enable_secure_boot', action='store_true')
826835
c.argument("if_match")
827836
c.argument("if_none_match")
837+
c.argument('gpu_driver', arg_type=get_enum_type(gpu_driver_install_modes))
828838

829839
with self.argument_context('aks nodepool update', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='agent_pools') as c:
830840
c.argument('enable_cluster_autoscaler', options_list=[

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,3 +844,11 @@ def validate_bootstrap_container_registry_resource_id(namespace):
844844
from msrestazure.tools import is_valid_resource_id
845845
if not is_valid_resource_id(container_registry_resource_id):
846846
raise InvalidArgumentValueError("--bootstrap-container-registry-resource-id is not a valid Azure resource ID.")
847+
848+
849+
def validate_custom_ca_trust_certificates(namespace):
850+
"""Validates Custom CA Trust Certificates can only be used on Linux."""
851+
if namespace.custom_ca_trust_certificates is not None and namespace.custom_ca_trust_certificates != "":
852+
if hasattr(namespace, 'os_type') and namespace.os_type != "Linux":
853+
raise ArgumentUsageError(
854+
'--custom-ca-trust-certificates can only be set for linux nodepools')

0 commit comments

Comments
 (0)