From 2ebd9c4b3c66285dd0f6846b740c0c2121574a14 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Mon, 13 Dec 2021 13:47:38 -0800 Subject: [PATCH] Do not create identity with appliances (#97) --- src/k8s-extension/azext_k8s_extension/custom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/k8s-extension/azext_k8s_extension/custom.py b/src/k8s-extension/azext_k8s_extension/custom.py index 8f845333f3b..c0a2c4cdb6a 100644 --- a/src/k8s-extension/azext_k8s_extension/custom.py +++ b/src/k8s-extension/azext_k8s_extension/custom.py @@ -359,7 +359,11 @@ def __create_identity(cmd, resource_group_name, cluster_name, cluster_type): subscription_id = get_subscription_id(cmd.cli_ctx) resources = cf_resources(cmd.cli_ctx, subscription_id) - if cluster_type.lower() == consts.MANAGED_CLUSTER_TYPE: + # We do not create any identities for managedClusters or appliances + if ( + cluster_type.lower() == consts.MANAGED_CLUSTER_TYPE + or cluster_type.lower() == consts.APPLIANCE_TYPE + ): return None, None cluster_rp, parent_api_version = get_cluster_rp_api_version(cluster_type)