Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9f2b3ab
initial commit
bosesuneha Oct 16, 2023
1c1e511
help
bosesuneha Oct 16, 2023
d84903c
cli params
bosesuneha Oct 16, 2023
5f68de3
added custom functions
bosesuneha Oct 19, 2023
fb6cc4d
added update function in decorator
bosesuneha Oct 19, 2023
3db438d
added initial tests
bosesuneha Oct 19, 2023
ee47439
dns zone list format
bosesuneha Oct 23, 2023
9009524
added import
bosesuneha Oct 23, 2023
da5dfab
dns zone list function
bosesuneha Oct 23, 2023
43aa554
updated mc decorator
bosesuneha Oct 23, 2023
5fead3f
added tests
bosesuneha Oct 23, 2023
56840eb
fixed build error
bosesuneha Oct 23, 2023
d1ad09c
updated function name
bosesuneha Oct 23, 2023
84c6ea0
resolved conflict
bosesuneha Oct 23, 2023
43c2fcf
fixed typo
bosesuneha Oct 23, 2023
cef864f
fixed tests
bosesuneha Oct 23, 2023
c8f3993
fixed typo
bosesuneha Oct 23, 2023
9de3278
updated list format function
bosesuneha Oct 25, 2023
dd9914f
typo
bosesuneha Oct 25, 2023
bab9c5d
updated cli changes
bosesuneha Oct 25, 2023
be061cc
add recordings
bosesuneha Oct 25, 2023
d0514bf
fixed lint errors
bosesuneha Oct 25, 2023
0d4b60d
updated unit tests
bosesuneha Oct 25, 2023
4c656b1
Merge branch 'main' into approuting-cli-simplification
bosesuneha Oct 25, 2023
45963cb
updates zone list function
bosesuneha Oct 25, 2023
4ed129a
update help
bosesuneha Oct 25, 2023
6500ee3
update version
bosesuneha Oct 25, 2023
16f7dd2
removed format function
bosesuneha Oct 25, 2023
13e78a4
removed flakes error
bosesuneha Oct 25, 2023
7276def
removed unused import
bosesuneha Oct 25, 2023
ae95679
removed unused import
bosesuneha Oct 25, 2023
a13c897
blank line
bosesuneha Oct 25, 2023
ffb0e52
feedback changes
bosesuneha Oct 27, 2023
4feafe1
updated live test recordings
bosesuneha Nov 2, 2023
c909341
feedback changes
bosesuneha Nov 2, 2023
4f2a67a
lint issues
bosesuneha Nov 2, 2023
666550a
Merge remote-tracking branch 'origin' into approuting-cli-simplification
bosesuneha Nov 2, 2023
ba6a67d
updated recording files
bosesuneha Nov 2, 2023
8603718
updated version
bosesuneha Nov 2, 2023
ad81f26
updated recording file
bosesuneha Nov 2, 2023
e1d1b02
feedback changes
bosesuneha Nov 7, 2023
791c123
Merge branch 'main' into approuting-cli-simplification
FumingZhang Nov 7, 2023
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 @@ -23,6 +23,10 @@ Pending
* Add `--node-soak-duration` to the `az aks nodepool add/update/upgrade` commands.
* Add `--drain-timeout` to the `az aks nodepool add/update/upgrade` commands (already in [azure-cli](https://github.com/Azure/azure-cli/pull/27475)).

0.5.169
+++++++
* Add `az aks approuting` and `az aks approuting zone` commands for managing App Routing.

0.5.168
+++++++
* Add `--enable-image-integrity` to the `az aks update` command.
Expand Down
4 changes: 4 additions & 0 deletions src/aks-preview/azext_aks_preview/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,7 @@ def get_msi_client(cli_ctx, subscription_id=None):

def get_providers_client_factory(cli_ctx, subscription_id=None):
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, subscription_id=subscription_id).providers


def get_keyvault_client(cli_ctx, subscription_id=None):
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_KEYVAULT, subscription_id=subscription_id).vaults
93 changes: 93 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@
- name: --enable-cost-analysis
type: bool
short-summary: Enable exporting Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. For more information see aka.ms/aks/docs/cost-analysis.
- name: --enable-app-routing
type: bool
short-summary: Enable Application Routing addon.
- name: --node-provisioning-mode
type: string
short-summary: Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". For more information on "Auto" mode see aka.ms/aks/nap.
Expand Down Expand Up @@ -2812,3 +2815,93 @@
- name: Disable an egress gateway.
text: az aks mesh disable-egress-gateway --resource-group MyResourceGroup --name MyManagedCluster
"""

helps['aks approuting'] = """
type: group
short-summary: Commands to manage App Routing aadon.
long-summary: A group of commands to manage App Routing in given cluster.
"""

helps['aks approuting enable'] = """
type: command
short-summary: Enable App Routing.
long-summary: This command enables App Routing in given cluster.
parameters:
- name: --enable-kv
type: bool
short-summary: Enable the keyvault secrets provider.
long-summary: This optional flag enables the keyvault-secrets-provider addon in given cluster. This is required for most App Routing use-cases.
- name: --attach-kv
type: string
short-summary: Attach a keyvault id to access secrets and certificates.
long-summary: This optional flag attaches a keyvault id to access secrets and certificates.
"""

helps['aks approuting disable'] = """
type: command
short-summary: Disable App Routing addon.
long-summary: This command disables App Routing in given cluster.
"""

helps['aks approuting update'] = """
type: command
short-summary: Update App Routing addon.
long-summary: This command is used to update keyvault id in App Routing addon.
parameters:
- name: --attach-kv
type: string
short-summary: Attach a keyvault id to access secrets and certificates.
long-summary: This optional flag attaches a keyvault id to access secrets and certificates.
- name: --enable-kv
type: bool
short-summary: Enable the keyvault secrets provider addon.
long-summary: This optional flag enables the keyvault-secrets-provider addon in given cluster. This is required for most App Routing use-cases.
"""

helps['aks approuting zone'] = """
type: group
short-summary: Commands to manage App Routing DNS Zones.
long-summary: A group of commands to manage App Routing DNS zones in given cluster.
"""

helps['aks approuting zone add'] = """
type: command
short-summary: Add DNS Zone(s) to App Routing.
long-summary: This command adds multiple DNS zone resource IDs to App Routing.
parameters:
- name: --ids
type: string
short-summary: Comma-separated list of DNS zone resource IDs to add to App Routing.
- name: --attach-zones
type: bool
short-summary: Grant DNS zone Contributor permissions on all zone IDs specified in --ids.
"""

helps['aks approuting zone delete'] = """
type: command
short-summary: Delete DNS Zone(s) from App Routing.
long-summary: This command deletes DNS zone resource IDs from App Routing in given cluster.
parameters:
- name: --ids
type: string
short-summary: Comma-separated list of DNS zone resource IDs to delete from App Routing.
"""

helps['aks approuting zone update'] = """
type: command
short-summary: Replace DNS Zone(s) in App Routing.
long-summary: This command replaces the DNS zone resource IDs used in App Routing.
parameters:
- name: --ids
type: string
short-summary: Comma-separated list of DNS zone resource IDs to replace in App Routing.
- name: --attach-zones
type: bool
short-summary: Grant DNS zone Contributor permissions on all zone IDs specified in --ids.
"""

helps['aks approuting zone list'] = """
type: command
short-summary: List DNS Zone IDs in App Routing.
long-summary: This command lists the DNS zone resources used in App Routing.
"""
25 changes: 25 additions & 0 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ def load_arguments(self, _):
c.argument('enable_secret_rotation', action='store_true')
c.argument('rotation_poll_interval')
c.argument('enable_sgxquotehelper', action='store_true')
c.argument('enable_app_routing', action='store_true', is_preview=True)
# nodepool paramerters
c.argument('nodepool_name', default='nodepool1',
help='Node pool name, upto 12 alphanumeric characters', validator=validate_nodepool_name)
Expand Down Expand Up @@ -1032,6 +1033,30 @@ def load_arguments(self, _):
with self.argument_context('aks mesh upgrade start') as c:
c.argument('revision', validator=validate_azure_service_mesh_revision, required=True)

with self.argument_context('aks approuting enable') as c:
c.argument('enable_kv', action='store_true')
c.argument('keyvault_id', options_list=[
'--attach-kv'])

with self.argument_context('aks approuting update') as c:
c.argument('keyvault_id', options_list=[
'--attach-kv'])
c.argument('enable_kv', action='store_true')

with self.argument_context('aks approuting zone add') as c:
c.argument('dns_zone_resource_ids', options_list=[
'--ids'], required=True)
c.argument('attach_zones')

with self.argument_context('aks approuting zone delete') as c:
c.argument('dns_zone_resource_ids', options_list=[
'--ids'], required=True)

with self.argument_context('aks approuting zone update') as c:
c.argument('dns_zone_resource_ids', options_list=[
'--ids'], required=True)
c.argument('attach_zones')


def _get_default_install_location(exe_name):
system = platform.system()
Expand Down
27 changes: 27 additions & 0 deletions src/aks-preview/azext_aks_preview/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,30 @@ def load_command_table(self, _):
'rollback',
'aks_mesh_upgrade_rollback',
supports_no_wait=True)

# AKS approuting commands
with self.command_group('aks approuting', managed_clusters_sdk, client_factory=cf_managed_clusters) as g:
g.custom_command(
'enable',
'aks_approuting_enable')
g.custom_command(
'disable',
'aks_approuting_disable', confirmation=True)
g.custom_command(
'update',
'aks_approuting_update')

# AKS approuting dns-zone commands
with self.command_group('aks approuting zone', managed_clusters_sdk, client_factory=cf_managed_clusters) as g:
g.custom_command(
'add',
'aks_approuting_zone_add')
g.custom_command(
'delete',
'aks_approuting_zone_delete', confirmation=True)
g.custom_command(
'update',
'aks_approuting_zone_update')
g.custom_command(
'list',
'aks_approuting_zone_list')
Loading