-
Notifications
You must be signed in to change notification settings - Fork 1.6k
{AKS} az aks create/update: Add --enable-default-domain and --disable-default-domain parameters to manage the default domain feature for web app routing
#9578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b0c3c56
cfd0f36
1d0f45c
16dade3
6463125
db6866d
4004507
d291762
a0d8aeb
75f101d
ba5c28e
782d713
84aa667
1e6646f
64ecabb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -789,6 +789,7 @@ def load_arguments(self, _): | |
| arg_type=get_enum_type(app_routing_nginx_configs), | ||
| options_list=["--app-routing-default-nginx-controller", "--ardnc"] | ||
| ) | ||
| c.argument("enable_default_domain", action="store_true", is_preview=True) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious why only this occurrence is marked as is_preview, while the others are not.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added is_preview to the rest. Good catch! |
||
| # nodepool paramerters | ||
| c.argument( | ||
| "nodepool_name", | ||
|
|
@@ -2836,11 +2837,14 @@ def load_arguments(self, _): | |
| c.argument("enable_kv", action="store_true") | ||
| c.argument("keyvault_id", options_list=["--attach-kv"]) | ||
| c.argument("nginx", arg_type=get_enum_type(app_routing_nginx_configs)) | ||
| c.argument("enable_default_domain", action="store_true", is_preview=True) | ||
|
|
||
| with self.argument_context("aks approuting update") as c: | ||
| c.argument("keyvault_id", options_list=["--attach-kv"]) | ||
| c.argument("enable_kv", action="store_true") | ||
| c.argument("nginx", arg_type=get_enum_type(app_routing_nginx_configs)) | ||
| c.argument("enable_default_domain", action="store_true", is_preview=True) | ||
| c.argument("disable_default_domain", action="store_true", is_preview=True) | ||
|
|
||
| with self.argument_context("aks approuting zone add") as c: | ||
| c.argument("dns_zone_resource_ids", options_list=["--ids"], required=True) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3565,6 +3565,20 @@ def get_app_routing_default_nginx_controller(self) -> str: | |||||||||||||||||||
| """ | ||||||||||||||||||||
| return self.raw_param.get("app_routing_default_nginx_controller") | ||||||||||||||||||||
|
|
||||||||||||||||||||
| def get_enable_default_domain(self) -> bool: | ||||||||||||||||||||
| """Obtain the value of enable_default_domain. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| :return: bool | ||||||||||||||||||||
| """ | ||||||||||||||||||||
| return self.raw_param.get("enable_default_domain") | ||||||||||||||||||||
|
|
||||||||||||||||||||
| def get_disable_default_domain(self) -> bool: | ||||||||||||||||||||
| """Obtain the value of disable_default_domain. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| :return: bool | ||||||||||||||||||||
| """ | ||||||||||||||||||||
| return self.raw_param.get("disable_default_domain") | ||||||||||||||||||||
|
|
||||||||||||||||||||
| def get_nginx(self): | ||||||||||||||||||||
| """Obtain the value of nginx, written to the update decorator context by _aks_approuting_update | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
||||||||||||||||||||
|
|
@@ -4164,6 +4178,23 @@ def set_up_ingress_web_app_routing(self, mc: ManagedCluster) -> ManagedCluster: | |||||||||||||||||||
| dns_zone_resource_ids = self.context.get_dns_zone_resource_ids() | ||||||||||||||||||||
| mc.ingress_profile.web_app_routing.dns_zone_resource_ids = dns_zone_resource_ids | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if self.context.get_enable_default_domain() or self.context.get_disable_default_domain(): | ||||||||||||||||||||
|
||||||||||||||||||||
| if self.context.get_enable_default_domain() or self.context.get_disable_default_domain(): | |
| if self.context.get_enable_default_domain() or self.context.get_disable_default_domain(): | |
| # Default domain requires App Routing; make this dependency explicit to avoid | |
| # implicitly enabling App Routing when the user has not requested it. | |
| if not (self.context.get_enable_app_routing() or "web_application_routing" in addons): | |
| raise ArgumentUsageError( | |
| "--enable-default-domain/--disable-default-domain requires either " | |
| "--enable-app-routing or --enable-addons web_application_routing." | |
| ) |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected on empty lines. Please remove the trailing spaces to maintain code cleanliness.
| enable = True | |
| enable = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please pull the latest code from the main branch.
there should a feature in the pending session, please involve the changelog under the upcoming version:
azure-cli-extensions/src/aks-preview/HISTORY.rst
Lines 12 to 14 in 5f8e06e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to that. thank you!