[AKS] Add command az aks namespace to support for managed namespace feature#32387
[AKS] Add command az aks namespace to support for managed namespace feature#32387
az aks namespace to support for managed namespace feature#32387Conversation
️✔️AzureCLI-FullTest
|
|
Hi @xmzhao0822, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks namespace | sub group aks namespace added |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive support for managed namespaces in Azure Kubernetes Service (AKS), enabling users to create, update, list, show, delete, and retrieve credentials for managed namespaces within AKS clusters.
- Introduces a new
managednamespace.pymodule with core logic for managed namespace operations - Adds validation functions for namespace names and resource quotas
- Implements CLI commands and help documentation for namespace management
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/acs/managednamespace.py | New module implementing core logic for add/update operations with validation |
| src/azure-cli/azure/cli/command_modules/acs/custom.py | Adds command implementations for namespace CRUD operations and credential retrieval |
| src/azure-cli/azure/cli/command_modules/acs/commands.py | Registers new CLI command group for aks namespace operations |
| src/azure-cli/azure/cli/command_modules/acs/_validators.py | Adds validators for namespace names and resource quota formats |
| src/azure-cli/azure/cli/command_modules/acs/_params.py | Defines parameters and argument configurations for namespace commands |
| src/azure-cli/azure/cli/command_modules/acs/_help.py | Provides help documentation and examples for namespace commands |
| src/azure-cli/azure/cli/command_modules/acs/_format.py | Adds table formatting for namespace list output |
| src/azure-cli/azure/cli/command_modules/acs/_consts.py | Defines constants for namespace policies and network rules |
| src/azure-cli/azure/cli/command_modules/acs/_client_factory.py | Adds client factory for managed namespace operations |
| src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_validators.py | Adds unit tests for namespace name and resource quota validators |
| src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_managednamespace.py | Adds unit tests for namespace add/update validation logic |
| src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_aks_commands.py | Adds integration test for end-to-end namespace operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| @AllowLargeResponse() | ||
| @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') | ||
| def test_aks_managed_namespace(self, resource_group, resource_group_location): |
There was a problem hiding this comment.
Queued live test to validate the change, test passed!
Related command
az aks namespace add -g --cluster-name --nameaz aks namespace update -g --cluster-name --nameaz aks namespace show -g --cluster-name --nameaz aks namespace list -g --cluster-name --nameaz aks namespace delete -g --cluster-name --nameaz aks namespace get-credentials -g --cluster-name --nameDescription
GA the feature for AKS managed namespace. Most logic are copied from AKS cli extension.
Testing Guide
This command will create a managed namespace on an AKS cluster
This command will update the properties of an existing managed namespace on an AKS cluster
az aks namespace update -g xm-rg --cluster-name xm1105 -n ns1 --cpu-limit 600m --ingress-policy DenyAllThis command will show the details of a managed namespace in managed Kubernetes cluster
az aks namespace show -g xm-rg --cluster-name xmdemo --name ns1This command will list managed namespaces in managed Kubernetes cluster
az aks namespace list -g xm-rg --cluster-name xmdemoThis command will delete a managed namespace in managed Kubernetes cluster
az aks namespace delete -g xm-rg --cluster-name xmdemo -n ns1This command will get access credentials for a managed namespace
az aks namespace get-credentials --name ns1 --cluster-name xmdemo --resource-group xm-rgHistory Notes
[AKS]
az aks namespace add/update/show/list/delete/get-credentials: Add namespace command to support managed namespace featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.