Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
172bf90
add troubleshoot command under connectedk8s
Mar 25, 2021
29a8518
resolve check issues
Mar 25, 2021
fe3c1e8
fix final new line
Mar 25, 2021
be0e8cd
add back troubleshoot params
Mar 25, 2021
18059a8
implement helm version and permission checks
Apr 5, 2021
9db15cd
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions
Apr 7, 2025
a275367
add aks extension and aks extension type cli groups
Apr 15, 2025
380c7c3
fix pylint
Apr 16, 2025
42b425d
POC for extensions
Apr 18, 2025
06ab07a
fix formatting
Apr 19, 2025
06fb262
add test and revert connectedk8s changes
Apr 19, 2025
3a44615
remove newline from readme
Apr 19, 2025
d4433e2
fix linter issue
Apr 19, 2025
448b729
fix faulty examples
Apr 19, 2025
8983efb
fix linting issues
Apr 20, 2025
301dd4d
fix parse issue
Apr 20, 2025
220480b
fix
Apr 20, 2025
b7c8add
fix help.py
Apr 20, 2025
761f13c
fix more pylint issues
Apr 20, 2025
e0f3ffa
fix params
Apr 20, 2025
a8ceaf5
fix parameter issue
Apr 20, 2025
ec96375
fix the over indent
Apr 20, 2025
e5d3cba
fix pylint issue
Apr 20, 2025
b423474
resolve pylinter issue
Apr 20, 2025
10d82a6
remove location
Apr 21, 2025
5fd78fe
remove location
Apr 21, 2025
2dd53e8
add extension type
Apr 21, 2025
32faf3c
remove unrecognized parameter
Apr 21, 2025
7fb0a9d
add comma
Apr 21, 2025
7955f81
fix invalid naming convensitons
Apr 21, 2025
ab73b8d
fix pylinter issue
Apr 21, 2025
9c9ab8a
remove duplicate functions from k8sextension
Apr 21, 2025
b8e84c5
add check for allowed extensions
Apr 21, 2025
b64d86f
revise tests
Apr 22, 2025
cbc03df
Merge branch 'main' into sophiezhao/coreExtensions
sophsoph321 Apr 22, 2025
f9bb5ca
fix indentation issue
Apr 22, 2025
9f5c4f1
fix trailing whitespace
Apr 23, 2025
26fd186
cmmit
Apr 23, 2025
b37e4b6
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions
Apr 23, 2025
305ab69
add params
Apr 23, 2025
0a2ec2a
change
Apr 23, 2025
1662318
fix format.py
Apr 23, 2025
e435322
remove aks group
Apr 23, 2025
5b006d4
fix format.py
Apr 23, 2025
ec60378
add library func for params
Apr 23, 2025
64a59cb
add const
Apr 23, 2025
bb87272
remove libraries
Apr 23, 2025
3b8fef8
update format.py
Apr 23, 2025
f58c6f5
remove libraries from format.py
Apr 23, 2025
600ce6a
add check for allow list of extensions
Apr 23, 2025
0f10b32
add history.rst
Apr 23, 2025
77b41b4
fix unit test
Apr 24, 2025
740ec93
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
Apr 24, 2025
874b875
fix style in help.py
Apr 24, 2025
de573cd
fix extension type test
Apr 24, 2025
b4fa329
add cassete file
Apr 24, 2025
21638eb
Merge branch 'sophiezhao/addExtensionTypeCassette' of https://github.…
Apr 24, 2025
eff8683
add modified tests
Apr 24, 2025
ff0a431
Merge branch 'sophiezhao/addExtensionTypeCassette' of https://github.…
Apr 24, 2025
9993ff0
add cmd for patching the k8s extension
Apr 25, 2025
5f304ca
fix cassette file
Apr 25, 2025
9a24396
Merge branch 'sophiezhao/addExtensionTypeCassette' of https://github.…
Apr 25, 2025
6303f01
add update
Apr 25, 2025
37f38fa
fix PR comments in format, help.py
Apr 25, 2025
8b03e4a
fix style
Apr 25, 2025
add69a6
fix action.py
Apr 25, 2025
d48a71e
fix style
Apr 25, 2025
9c43b16
add newline in params.py
Apr 25, 2025
f2c9c96
update extension type command
Apr 26, 2025
96a44e2
fix pylint indentation
Apr 26, 2025
fbabfba
fix cli examples
Apr 26, 2025
da952c8
add resource group name as param
Apr 26, 2025
09f4057
add resource group param
Apr 26, 2025
2b4c63e
add autoupgrade as description
Apr 26, 2025
3f04747
fix autoupgrade param
Apr 26, 2025
afe333c
add abreviation
Apr 26, 2025
a447f1d
fix option list
Apr 26, 2025
c1741d3
add autoupgrade
Apr 26, 2025
3967c0b
change autoupgrade order
Apr 26, 2025
b116f51
add description for config settings
Apr 27, 2025
52f251c
specify additional parameters
Apr 27, 2025
dadb971
add examples for aks extension API
Apr 27, 2025
ebb2acb
rerun pylinter
Apr 27, 2025
d30bc29
rerun pipeline
Apr 28, 2025
ff01a7e
fix style and pylint issue
Apr 28, 2025
8096e12
add location param in help.py
Apr 28, 2025
30d187d
add region as param
Apr 28, 2025
d5fe2c5
run new command with style and linter
Apr 28, 2025
95c2416
add command group
Apr 28, 2025
374e7e7
make parameters optional
Apr 28, 2025
f1e7a4e
use custom show command
Apr 28, 2025
2960ab2
rerun style check
Apr 28, 2025
de68349
fix style
Apr 28, 2025
e37ca43
fix unexpected spaces
Apr 28, 2025
379abaa
remove extra show extension type commands
Apr 28, 2025
8b1edc5
fix params in extension types api
Apr 28, 2025
4933993
add show version command
Apr 28, 2025
308d9f1
fix style
Apr 28, 2025
2f5caab
fix extension list version command
Apr 28, 2025
abd28cb
fix style and linting issue
Apr 28, 2025
ec28180
fix aks test cases
Apr 28, 2025
7489304
print allowed list of extensions
Apr 28, 2025
45cd466
fix help.py description
Apr 28, 2025
8fbb72a
fix pylinting issue
Apr 28, 2025
a04978f
fix style issue
Apr 28, 2025
b247002
fix style issue
Apr 28, 2025
6bfed92
add new cassette files
Apr 29, 2025
1966237
commit action.py
Apr 29, 2025
60922d3
Merge branch 'sophiezhao/addExtensionTypeCassette' of https://github.…
Apr 29, 2025
0a541be
add backup scenario
Apr 30, 2025
478a12e
Merge branch 'sophiezhao/addExtensionTypeCassette' of https://github.…
Apr 30, 2025
fedbd8a
add extension type version API commands
Apr 30, 2025
41ae7a0
fix help.py examples
Apr 30, 2025
ba731ce
fix help.py
Apr 30, 2025
462122a
fix version summary
Apr 30, 2025
8a9d74d
remove print statement
Apr 30, 2025
ee73bf0
add version show
Apr 30, 2025
4ba3d95
add custom helper function
Apr 30, 2025
d06e4d3
fix new line issue
Apr 30, 2025
d518a6e
remove show-version and list-versions
Apr 30, 2025
f96fbac
fix style issue
Apr 30, 2025
84683d6
fix style issue
Apr 30, 2025
7aac073
fix style issue
Apr 30, 2025
fdcd215
location of extension
Apr 30, 2025
ce0b2ae
fix pylinting issue
May 1, 2025
9c79606
fix location flag
May 1, 2025
43b1742
Update src/aks-preview/azext_aks_preview/tests/latest/test_aks_comman…
sophsoph321 May 1, 2025
2c17f1c
Update src/aks-preview/azext_aks_preview/tests/latest/test_aks_comman…
sophsoph321 May 1, 2025
6a26b58
add extension type filtering for core extensions
May 1, 2025
d6d2b61
Merge branch 'sophiezhao/coreExtensions' of https://github.com/sophso…
May 1, 2025
b144f5e
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 1, 2025
f9d9b9c
remove 3 properties
May 1, 2025
5dc1c9c
fix style
May 1, 2025
a00d705
add missing custom functions
May 1, 2025
235c7c9
upload cassette files
May 2, 2025
af6437f
change pending version
May 2, 2025
79a2ca8
modify casette files
May 2, 2025
7a81b9a
add k8s extension firewall
May 5, 2025
dcc8658
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 5, 2025
d3cb8f9
add latest cassette files
May 6, 2025
186f324
remove secrets from test case
May 6, 2025
1b1d9c3
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 6, 2025
baf1dba
register extension types feature
May 8, 2025
2cfc6ea
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 8, 2025
dcf04d4
add a wait period for the feature to register
May 8, 2025
cdc3c18
update version in setup.py
May 8, 2025
0ed32c8
fix cassette files
May 9, 2025
f9ffddd
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 9, 2025
a1aecac
update history.rst
May 9, 2025
4eda5d8
commit
May 22, 2025
6bd25e2
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 22, 2025
aa34320
add validation
May 26, 2025
e5c73d8
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 26, 2025
cc24709
update cassette files
May 27, 2025
ac382c1
update history.rst
May 27, 2025
e0ec999
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 27, 2025
f1fcb94
fix style issue in helpers.py
May 27, 2025
684ffdb
change api version
May 27, 2025
b8d948d
update casset files with correct API verisons
May 27, 2025
7809d7f
address PR comments
May 28, 2025
46960bc
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 28, 2025
a096efb
update setup.py
May 28, 2025
1b86b35
remove extra test files
May 28, 2025
eed5017
update casette files
May 29, 2025
695c16c
make tests live only
May 29, 2025
7928a10
fix style issue
May 29, 2025
a5f885c
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions …
May 29, 2025
96ffb0f
fix setup.py
May 29, 2025
5c64300
fix history.rst
May 29, 2025
5dc288a
fix style
May 29, 2025
695381b
fix failed test case
May 29, 2025
a237dd0
fix syntax error
May 29, 2025
ae18e74
update failed test
May 29, 2025
f463fb8
fix
May 30, 2025
5c1b0d9
fix recording
May 30, 2025
634895a
revert yaml changes
May 30, 2025
f06dbf5
fix put call API
May 30, 2025
b906cad
update api verisons
May 30, 2025
07bcea1
update api version
May 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

18.0.0b6
+++++++
* Quality improvements for `az aks extension` and `az aks extension type` command groups

18.0.0b5
+++++++
* Add option `Ubuntu2204` and `Ubuntu2404` to `--os-sku` for `az aks nodepool add` and `az aks nodepool update`.
Expand Down
54 changes: 27 additions & 27 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -3432,17 +3432,17 @@
short-summary: JSON file path for configuration-protected-settings
long-summary: JSON file path for configuration-protected-settings. If not specified, default value is None
examples:
- name: Install K8s extension on AKS cluster with required parameters
- name: Install Cluster extension on AKS cluster with required parameters
text: az aks extension create --resource-group my-resource-group \
--cluster-name mycluster --name myextension --extension-type microsoft.flux
- name: Install K8s extension with optional parameter configuration settings
- name: Install Cluster extension with optional parameter configuration settings
text: az aks extension create --resource-group abc --cluster-name test --name flux \
--extension-type microsoft.flux --config useKubeletIdentity=true
"""

helps['aks extension delete'] = """
type: command
short-summary: Delete a Kubernetes Extension.
short-summary: Delete a Cluster Extension.
parameters:
- name: --resource-group -g
type: string
Expand All @@ -3463,18 +3463,18 @@
long-summary: Specify whether to force delete the extension from the cluster \
If not specified, default value is false
examples:
- name: Delete an existing Kubernetes extension on AKS cluster
- name: Delete an existing Cluster extension on AKS cluster
text: az aks extension delete --resource-group resource-group --cluster-name cluster --name ext
- name: Delete an existing Kubernetes extension on AKS cluster with optional parameters
- name: Delete an existing Cluster extension on AKS cluster with optional parameters
text: az aks extension delete --resource-group resource-group --cluster-name cluster --name ext \
--yes --force
"""

helps['aks extension update'] = """
type: command
short-summary: Update mutable properties of a Kubernetes Extension.
short-summary: Update mutable properties of a Cluster Extension.
long-summary: For update to ConfigSettings and ConfigProtectedSettings, please \
refer to documentation of the cluster extension service to check update to these \
refer to documentation of the Cluster extension service to check update to these \
properties is supported before updating these properties. \
The output includes secrets that you must protect. Be sure that you do not include these secrets in your \
source control. Also verify that no secrets are present in the logs of your command or script. \
Expand Down Expand Up @@ -3512,10 +3512,10 @@
short-summary: Ignores confirmation prompt.
long-summary: Ignores confirmation prompt. If not specified, default value is false
examples:
- name: Update K8s extension on AKS cluster
- name: Update Cluster extension on AKS cluster
text: az aks extension update --resource-group my-resource-group \
--cluster-name mycluster --name myextension
- name: Update K8s extension on AKS cluster with optional parameters included
- name: Update Cluster extension on AKS cluster with optional parameters included
text: az aks extension update --resource-group my-resource-group \
--cluster-name mycluster --name myextension \
--configuration-settings settings-key=settings-value \
Expand All @@ -3526,8 +3526,8 @@

helps['aks extension list'] = """
type: command
short-summary: List Kubernetes Extensions
long-summary: List all Kubernetes Extensions in a cluster, including their properties. \
short-summary: List Cluster Extensions
long-summary: List all Cluster Extensions in a cluster, including their properties. \
The output includes secrets that you must protect. Be sure that you do not include these secrets in your \
source control. Also verify that no secrets are present in the logs of your command or script. \
For additional information, see http://aka.ms/clisecrets.
Expand All @@ -3539,14 +3539,14 @@
type: string
short-summary: Name of the AKS cluster
examples:
- name: List all Kubernetes Extensions on a cluster
- name: List all Cluster Extensions on a cluster
text: az aks extension list --resource-group <group> --cluster-name <name>
"""

helps['aks extension show'] = """
type: command
short-summary: Show a Kubernetes Extension
long-summary: Show a Kubernetes Extension including its properties. \
short-summary: Show a Cluster Extension
long-summary: Show a Cluster Extension including its properties. \
The output includes secrets that you must protect. Be sure that you do not include these secrets in your \
source control. Also verify that no secrets are present in the logs of your command or script. \
For additional information, see http://aka.ms/clisecrets.
Expand All @@ -3561,7 +3561,7 @@
type: string
short-summary: Name of the extension instance
examples:
- name: Show details of a Kubernetes Extension
- name: Show details of a Cluster Extension
text: az aks extension show --resource-group my-resource-group \
--cluster-name mycluster --name myextension
"""
Expand All @@ -3574,7 +3574,7 @@

helps['aks extension type show'] = """
type: command
short-summary: Show properties for a K8s Extension Type. The properties used for filtering include kubernetes version, location of the cluster.
short-summary: Show properties for a Cluster Extension Type. The properties used for filtering include kubernetes version, location of the cluster.
parameters:
- name: --extension-type -t
type: string
Expand All @@ -3593,16 +3593,16 @@
long-summary: Location of where we want to retrieve the extension type. If not specified, default value is None

examples:
- name: Show properties for a K8s Extension Type for an existing cluster by cluster
- name: Show properties for a Cluster Extension Type for an existing cluster by cluster
text: az aks extension type show --resource-group my-resource-group\
--cluster-name mycluster --extension-type <type>
- name: Show properties for a K8s Extension Type in a location
- name: Show properties for a Cluster Extension Type in a location
text: az aks extension type show --location eastus --extension-type type
"""

helps['aks extension type list'] = """
type: command
short-summary: List available K8s Extension Types. The properties used for filtering include kubernetes version, location of the cluster.
short-summary: List available Cluster Extension Types. The properties used for filtering include kubernetes version, location of the cluster.
parameters:
- name: --resource-group -g
type: string
Expand All @@ -3620,10 +3620,10 @@
type: string
short-summary: Specify the release train for the K8s extension type
examples:
- name: List available K8s Extension Types for an existing cluster
- name: List available Cluster Extension Types for an existing cluster
text: az aks extension type list --resource-group my-resource-group \
--cluster-name mycluster
- name: List available K8s Extension Types in a region
- name: List available Cluster Extension Types in a region
text: az aks extension type list --location eastus
"""

Expand All @@ -3635,7 +3635,7 @@

helps['aks extension type version show'] = """
type: command
short-summary: Show properties associated with a K8s Extension Type version. The properties used for filtering include kubernetes version, location of the cluster.
short-summary: Show properties associated with a Cluster Extension Type version. The properties used for filtering include kubernetes version, location of the cluster.
parameters:
- name: --resource-group -g
type: string
Expand All @@ -3656,16 +3656,16 @@
short-summary: Location of where we want to retrieve the extension type
long-summary: Location of where we want to retrieve the extension type. If not specified, default value is None
examples:
- name: Show properties for a K8s Extension Type version for an existing cluster
- name: Show properties for a Cluster Extension Type version for an existing cluster
text: az aks extension type version show --resource-group my-resource-group \
--cluster-name mycluster --extension-type type --version 1.0.0
- name: Show properties for a K8s Extension Type version for a location
- name: Show properties for a Cluster Extension Type version for a location
text: az aks extension type version show --location eastus --extension-type <type> --version 1.0.0
"""

helps['aks extension type version list'] = """
type: command
short-summary: List available K8s Extension Type versions. The properties used for filtering include kubernetes version, location of the cluster.
short-summary: List available Cluster Extension Type versions. The properties used for filtering include kubernetes version, location of the cluster.
parameters:
- name: --resource-group -g
type: string
Expand All @@ -3683,10 +3683,10 @@
short-summary: Location of where we want to retrieve the extension type
long-summary: Location of where we want to retrieve the extension type. If not specified, default value is None
examples:
- name: List available K8s Extension Types for an existing cluster
- name: List available Cluster Extension Types for an existing cluster
text: az aks extension type version list --resource-group my-resource-group \
--cluster-name mycluster --extension-type <type>
- name: List available K8s Extension Types in a region
- name: List available Cluster Extension Types in a region
text: az aks extension type version list --location eastus --extension-type <type>
"""

Expand Down
10 changes: 8 additions & 2 deletions src/aks-preview/azext_aks_preview/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ def _check_if_extension_type_is_in_allow_list(extension_type_name):

def raise_validation_error_if_extension_type_not_in_allow_list(extension_type_name):
if not _check_if_extension_type_is_in_allow_list(extension_type_name):
raise ValidationError(f"Failed to get extension type version by cluster for {extension_type_name.lower()} " +
f"as it is not in allowed list of extension types {allowed_extensions}")
raise ValidationError(f"Operation failed as extension type {extension_type_name.lower()} " +
f"is not in allowed list of extension types {allowed_extensions}")


def filter_hard_taints(node_initialization_taints: List[str]) -> List[str]:
Expand Down Expand Up @@ -442,3 +442,9 @@ def get_all_extensions_in_allow_list(result):
if _check_if_extension_type_is_in_allow_list(obj.extension_type.lower()):
output.append(obj)
return output


def get_extension_in_allow_list(result):
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review whether returning None when the extension does not pass the allowed list check is the best approach for error handling. Consider if raising a ValidationError might provide clearer feedback in the command workflow.

Copilot uses AI. Check for mistakes.
if _check_if_extension_type_is_in_allow_list(result.extension_type.lower()):
return result
return None
10 changes: 5 additions & 5 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@
validate_bootstrap_container_registry_resource_id,
validate_gateway_prefix_size,
validate_max_unavailable,
validate_location_cluster_name_resource_group_mutually_exclusive,
validate_resource_group_parameter,
validate_location_resource_group_cluster_parameters,
)
from azext_aks_preview.azurecontainerstorage._consts import (
CONST_ACSTOR_ALL,
Expand Down Expand Up @@ -2491,14 +2491,14 @@ def load_arguments(self, _):
help='Name of resource group.')
c.argument('cluster_name',
options_list=['--cluster-name', '-c'],
validator=validate_location_cluster_name_resource_group_mutually_exclusive,
validator=validate_location_resource_group_cluster_parameters,
help='Name of the Kubernetes cluster')
c.argument('extension_type',
options_list=['--extension-type', '-t'],
help='Name of the extension type.')
c.argument('location',
options_list=['--location', '-l'],
validator=validate_location_cluster_name_resource_group_mutually_exclusive,
validator=validate_location_resource_group_cluster_parameters,
help='Name of the location. Values from: `az account list-locations`')

# Reference: https://learn.microsoft.com/en-us/cli/azure/k8s-extension/extension-types?view=azure-cli-latest
Expand All @@ -2509,14 +2509,14 @@ def load_arguments(self, _):
help='Name of resource group.')
c.argument('cluster_name',
options_list=['--cluster-name', '-c'],
validator=validate_location_cluster_name_resource_group_mutually_exclusive,
validator=validate_location_resource_group_cluster_parameters,
help='Name of the Kubernetes cluster')
c.argument('extension_type',
options_list=['--extension-type', '-t'],
help='Name of the extension type.')
c.argument('location',
options_list=['--location', '-l'],
validator=validate_location_cluster_name_resource_group_mutually_exclusive,
validator=validate_location_resource_group_cluster_parameters,
help='Name of the location. Values from: `az account list-locations`')
c.argument('version',
help='Version for the extension type.')
Expand Down
24 changes: 15 additions & 9 deletions src/aks-preview/azext_aks_preview/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,19 +935,25 @@ def validate_gateway_prefix_size(namespace):
raise CLIError("--gateway-prefix-size must be in the range [28, 31]")


def validate_location_cluster_name_resource_group_mutually_exclusive(namespace):
"""Validates that location, cluster name, and resource group name are not specified at the same time"""
def validate_resource_group_parameter(namespace):
"""Validates that if the user specified the cluster name, resource group name is also specified and vice versa"""
if namespace.resource_group_name and not namespace.cluster_name:
raise RequiredArgumentMissingError("Please specify --cluster")
if not namespace.resource_group_name and namespace.cluster_name:
raise RequiredArgumentMissingError("Please specify --resource-group")


def validate_location_resource_group_cluster_parameters(namespace):
"""Validates location or cluster details are specified and not mutually exclusive"""
location = namespace.location
resource_group_name = namespace.resource_group_name
cluster_name = namespace.cluster_name
if location and (resource_group_name or cluster_name):
raise RequiredArgumentMissingError(
"You must specify --location or --resource-group and --cluster."
)

if location and resource_group_name and cluster_name:
raise MutuallyExclusiveArgumentError(
"Cannot specify --location and --resource-group and --cluster at the same time."
)


def validate_resource_group_parameter(namespace):
if namespace.resource_group_name and not namespace.cluster_name:
raise RequiredArgumentMissingError("Please specify --cluster")
if not namespace.resource_group_name and namespace.cluster_name:
raise RequiredArgumentMissingError("Please specify --resource-group")
3 changes: 2 additions & 1 deletion src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
get_all_extension_types_in_allow_list,
get_all_extensions_in_allow_list,
raise_validation_error_if_extension_type_not_in_allow_list,
get_extension_in_allow_list,
)
from azext_aks_preview._podidentity import (
_ensure_managed_identity_operator_permission,
Expand Down Expand Up @@ -3987,7 +3988,7 @@ def show_k8s_extension(cmd, client, resource_group_name, cluster_name, name):
name,
"managedClusters",
)
return result
return get_extension_in_allow_list(result)
except Exception as ex:
logger.error("Failed to get K8s extension.\nError: %s", ex)

Expand Down
Loading
Loading