From df7ef365e65059d7fe449f12476cbde430761af8 Mon Sep 17 00:00:00 2001 From: Bin Xia Date: Thu, 2 Feb 2023 09:12:27 +0000 Subject: [PATCH] [AKS] Mark AAD-legacy properties deprecated --- src/aks-preview/HISTORY.rst | 2 ++ src/aks-preview/azext_aks_preview/_help.py | 3 +++ src/aks-preview/azext_aks_preview/_params.py | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index c7798bdf700..ae89e18f58d 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,6 +12,8 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ +* Mark AAD-legacy properties `--aad-client-app-id`, `--aad-server-app-id` and `--aad-server-app-secret` deprecated + 0.5.128 +++++++ * Fix option name `--duration` for command group `az aks maintenanceconfiguration` diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index e5e9e1ded03..a0934dc13ff 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -109,13 +109,16 @@ type: string short-summary: The ID of an Azure Active Directory client application of type "Native". This application is for user login via kubectl. + long-summary: --aad-client-app-id is deprecated. See https://aka.ms/aks/aad-legacy for details. - name: --aad-server-app-id type: string short-summary: The ID of an Azure Active Directory server application of type "Web app/API". This application represents the managed cluster's apiserver (Server application). + long-summary: --aad-server-app-id is deprecated. See https://aka.ms/aks/aad-legacy for details. - name: --aad-server-app-secret type: string short-summary: The secret of an Azure Active Directory server application. + long-summary: --aad-server-app-secret is deprecated. See https://aka.ms/aks/aad-legacy for details. - name: --aad-tenant-id type: string short-summary: The ID of an Azure Active Directory tenant. diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 0ec802f53d0..1807cda038d 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -294,9 +294,9 @@ def load_arguments(self, _): c.argument('assign_kubelet_identity', validator=validate_assign_kubelet_identity) c.argument('enable_aad', action='store_true') c.argument('enable_azure_rbac', action='store_true') - c.argument('aad_client_app_id') - c.argument('aad_server_app_id') - c.argument('aad_server_app_secret') + c.argument('aad_client_app_id', deprecate_info=c.deprecate(target='--aad-client-app-id', hide=True)) + c.argument('aad_server_app_id', deprecate_info=c.deprecate(target='--aad-server-app-id', hide=True)) + c.argument('aad_server_app_secret', deprecate_info=c.deprecate(target='--aad-server-app-secret', hide=True)) c.argument('aad_tenant_id') c.argument('aad_admin_group_object_ids') c.argument('enable_oidc_issuer', action='store_true')