diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index 26f74453ad8..29729594ce8 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -2,6 +2,12 @@ Release History =============== +1.10.10 ++++++ +* Deprecated '--app-id' and '--app-secret' RBAC parameters from the extension by adding them to _breaking_change.py. +* Bug fix for https://github.com/Azure/azure-cli-extensions/issues/8498. +* Update warning to use the latest kubelogin version which has support for generating PoP token. + 1.10.9 ++++++ * Added support for associating and disassociating gateways in CLI and updated SDK version to '2025-08-01-preview'. @@ -78,7 +84,7 @@ Release History ++++++ * New api version 2024-07-1-preview added * Adding functionality for workload identity feature. -* Cluster create and update waits for agent state +* Cluster create and update waits for agent state 1.7.3 ++++++ diff --git a/src/connectedk8s/azext_connectedk8s/_breaking_change.py b/src/connectedk8s/azext_connectedk8s/_breaking_change.py new file mode 100644 index 00000000000..07672e334cf --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/_breaking_change.py @@ -0,0 +1,8 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +from azure.cli.core.breaking_change import register_argument_deprecate + +register_argument_deprecate("connectedk8s enable-features", "--app-id") +register_argument_deprecate("connectedk8s enable-features", "--app-secret") diff --git a/src/connectedk8s/azext_connectedk8s/_utils.py b/src/connectedk8s/azext_connectedk8s/_utils.py index 79113662b1b..6717ed907c1 100644 --- a/src/connectedk8s/azext_connectedk8s/_utils.py +++ b/src/connectedk8s/azext_connectedk8s/_utils.py @@ -1056,10 +1056,10 @@ def arm_exception_handler( status_code = ex.status_code if status_code == 404 and return_if_not_found: return - if status_code is not None and status_code // 100 == 4: + if status_code and status_code // 100 == 4: telemetry.set_user_fault() telemetry.set_exception(exception=ex, fault_type=fault_type, summary=summary) - if status_code is not None and status_code // 100 == 5: + if status_code and status_code // 100 == 5: raise AzureInternalError( "Http response error occured while making ARM request: " + str(ex) diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index cf18aee9672..c5ed8ed8ec9 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -2993,6 +2993,10 @@ def enable_features( utils.check_features_to_update(features) ) + # Initialize these variables to ensure they are always defined, preventing UnboundLocalError if only a subset of features is enabled. + final_enable_cl = False + custom_locations_oid = None + # Check if cluster is private link enabled connected_cluster = client.get(resource_group_name, cluster_name) @@ -3152,8 +3156,9 @@ def enable_features( # apps for authN/authZ. cmd_helm_upgrade.extend(["--set", "systemDefaultValues.guard.authnMode=arc"]) logger.warning( - "Please use the kubelogin version v0.0.32 or higher which has support for generating PoP token(s). " - "This is needed by guard running in 'arc' authN mode." + "[Azure RBAC] For secure authentication, ensure you have the latest kubelogin installed which supports PoP tokens. " + "This is required for Azure RBAC. Download or upgrade at: https://github.com/Azure/kubelogin/releases. " + "If you encounter authentication errors, please verify your kubelogin version and refer to the documentation: https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/azure-rbac" ) cmd_helm_upgrade.extend( [ diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py index e33b3849ff7..d911326cd31 100644 --- a/src/connectedk8s/setup.py +++ b/src/connectedk8s/setup.py @@ -13,7 +13,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = "1.10.9" +VERSION = "1.10.10" # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers