diff --git a/src/azure-cli/azure/cli/command_modules/acr/_breaking_change.py b/src/azure-cli/azure/cli/command_modules/acr/_breaking_change.py index a436591761d..55239c0723e 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_breaking_change.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_breaking_change.py @@ -3,7 +3,25 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.breaking_change import register_output_breaking_change +from azure.cli.core.breaking_change import register_output_breaking_change, register_command_group_deprecate register_output_breaking_change(command_name='acr login', description='Exit code will be 1 if command fails for docker login') + +helm_bc_msg = 'In November 2020, Helm 2 reached end of life. ' \ + 'Starting on March 30th, 2025 Azure Container Registry will no longer support Helm 2. ' \ + 'Therefore, the legacy "Helm repositories" functionality will also be retired. ' \ + 'We recommend that you transition to Helm 3 immediately.\n' \ + 'Starting January 21st, 2025 the CLI command `az acr helm push` was retired to ' \ + 'prevent pushing new Helm charts to legacy Helm repositories.\n' \ + 'Starting March 30th, 2025 the CLI command group `az acr helm` was retired, ' \ + 'ending all legacy Helm repository capabilities in Azure Container Registry.\n' \ + 'All Helm charts not stored as an OCI artifact ' \ + 'was deleted from Azure Container Registry on March 30th, 2025.\n' \ + 'Learn how to find all Helm charts stored in a Helm repository here: `az acr helm list`. ' \ + 'If the Helm chart you are using is listed ' \ + 'then it is stored in a legacy Helm repository and is at risk of deletion.\n' \ + 'For more information on managing and deploying applications for Kubernetes, ' \ + 'see https://aka.ms/acr/helm.' +register_command_group_deprecate(command_group='acr helm', redirect='Helm v3 commands', message=helm_bc_msg, + target_version='Sept 30th, 2025') diff --git a/src/azure-cli/azure/cli/command_modules/acr/commands.py b/src/azure-cli/azure/cli/command_modules/acr/commands.py index 7ddc3279286..bd66309a43c 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/commands.py +++ b/src/azure-cli/azure/cli/command_modules/acr/commands.py @@ -360,24 +360,13 @@ def load_command_table(self, _): g.show_command('show', 'acr_config_authentication_as_arm_show') g.command('update', 'acr_config_authentication_as_arm_update') - def _helm_deprecate_message(self): - msg = "This {} has been deprecated and will be removed in future release.".format(self.object_type) - msg += " Use '{}' instead.".format(self.redirect) - msg += " Learn more about storing Helm charts at" - msg += " https://aka.ms/acr/helm" - return msg - - helm_deprecate_info = self.deprecate(redirect="Helm v3 commands", message_func=_helm_deprecate_message) - - with self.command_group('acr helm', acr_helm_util, deprecate_info=helm_deprecate_info) as g: - g.command('list', 'acr_helm_list', table_transformer=helm_list_output_format, - deprecate_info=helm_deprecate_info) - g.show_command('show', 'acr_helm_show', table_transformer=helm_show_output_format, - deprecate_info=helm_deprecate_info) - g.command('delete', 'acr_helm_delete', deprecate_info=helm_deprecate_info) - g.command('push', 'acr_helm_push', deprecate_info=helm_deprecate_info) - g.command('repo add', 'acr_helm_repo_add', deprecate_info=helm_deprecate_info) - g.command('install-cli', 'acr_helm_install_cli', is_preview=True, deprecate_info=helm_deprecate_info) + with self.command_group('acr helm', acr_helm_util) as g: + g.command('list', 'acr_helm_list', table_transformer=helm_list_output_format) + g.show_command('show', 'acr_helm_show', table_transformer=helm_show_output_format) + g.command('delete', 'acr_helm_delete') + g.command('push', 'acr_helm_push') + g.command('repo add', 'acr_helm_repo_add') + g.command('install-cli', 'acr_helm_install_cli', is_preview=True) with self.command_group('acr network-rule', acr_network_rule_util) as g: g.command('list', 'acr_network_rule_list')