Skip to content

Commit 0379b08

Browse files
Mauricio FerrariMauricio Ferrari
authored andcommitted
Remove managed gateway API changes from cherry-picked istio commits
The cherry-picked App Routing Istio commits from PR #33254 share branch ancestry with the Managed Gateway API changes from PR #33238. This commit surgically removes the gateway-api-only code that came along, while preserving the App Routing Istio functionality. Removed: - CONST_MANAGED_GATEWAY_INSTALLATION_DISABLED/STANDARD constants - enable_gateway_api / disable_gateway_api parameters and help entries - set_up_ingress_profile_gateway_api / update_ingress_profile_gateway_api decorator methods - Associated unit and integration tests Kept: - App Routing Istio (CONST_APP_ROUTING_ISTIO_MODE_*) - gateway_api_implementations.app_routing_istio field handling
1 parent 62c3624 commit 0379b08

7 files changed

Lines changed: 368 additions & 347 deletions

File tree

src/azure-cli/azure/cli/command_modules/acs/_consts.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@
209209
CONST_APP_ROUTING_INTERNAL_NGINX = "Internal"
210210
CONST_APP_ROUTING_NONE_NGINX = "None"
211211

212-
# managed gateway api installation
213-
CONST_MANAGED_GATEWAY_INSTALLATION_DISABLED = "Disabled"
214-
CONST_MANAGED_GATEWAY_INSTALLATION_STANDARD = "Standard"
215-
216212
# app routing istio mode
217213
CONST_APP_ROUTING_ISTIO_MODE_ENABLED = "Enabled"
218214
CONST_APP_ROUTING_ISTIO_MODE_DISABLED = "Disabled"

src/azure-cli/azure/cli/command_modules/acs/_help.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,6 @@
619619
- name: --enable-ai-toolchain-operator
620620
type: bool
621621
short-summary: Enable AI toolchain operator to the cluster.
622-
- name: --enable-gateway-api
623-
type: bool
624-
short-summary: Enable managed installation of Gateway API CRDs from the standard release channel. Requires at least one managed Gateway API ingress provider to be enabled.
625622
- name: --enable-app-routing-istio --enable-ari
626623
type: bool
627624
short-summary: Enable Gateway API based ingress on App Routing via Istio without service mesh functionality.
@@ -738,8 +735,6 @@
738735
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-provisioning-mode Auto --node-provisioning-default-pools None
739736
- name: Create a Kubernetes cluster with KataVmIsolation enabled.
740737
text: az aks create -g MyResourceGroup -n MyManagedCluster --os-sku AzureLinux --vm-size Standard_D4s_v3 --workload-runtime KataVmIsolation --node-count 1
741-
- name: Create a kubernetes cluster with the Azure Service Mesh addon enabled with a managed installation of Gateway API CRDs from the standard release channel.
742-
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azure-service-mesh --enable-gateway-api
743738
"""
744739

745740
helps["aks update"] = """
@@ -1163,12 +1158,6 @@
11631158
- name: --disable-ai-toolchain-operator
11641159
type: bool
11651160
short-summary: Disable AI toolchain operator.
1166-
- name: --enable-gateway-api
1167-
type: bool
1168-
short-summary: Enable managed installation of Gateway API CRDs from the standard release channel. Requires at least one managed Gateway API ingress provider to be enabled.
1169-
- name: --disable-gateway-api
1170-
type: bool
1171-
short-summary: Disable managed installation of Gateway API CRDs.
11721161
- name: --enable-app-routing-istio --enable-ari
11731162
type: bool
11741163
short-summary: Enable Gateway API based ingress on App Routing via Istio without service mesh functionality.
@@ -1267,10 +1256,6 @@
12671256
text: az aks update -g MyResourceGroup -n MyManagedCluster --node-provisioning-mode Auto --node-provisioning-default-pools None
12681257
- name: Upgrade load balancer sku to standard
12691258
text: az aks update --load-balancer-sku standard -g MyResourceGroup -n MyManagedCluster
1270-
- name: Update a kubernetes cluster to enable a managed installation of Gateway API CRDs from the standard release channel.
1271-
text: az aks update -g MyResourceGroup -n MyManagedCluster --enable-gateway-api
1272-
- name: Update a kubernetes cluster to disable the managed installation of Gateway API CRDs.
1273-
text: az aks update -g MyResourceGroup -n MyManagedCluster --disable-gateway-api
12741259
"""
12751260

12761261
helps["aks delete"] = """

src/azure-cli/azure/cli/command_modules/acs/_params.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,6 @@ def load_arguments(self, _):
651651
'by that action.'
652652
)
653653
)
654-
c.argument(
655-
"enable_gateway_api",
656-
action="store_true",
657-
help="Enable managed installation of Gateway API CRDs from the standard release channel. "
658-
"Requires a Gateway API implementation to be installed on the cluster (e.g., Azure Service Mesh)."
659-
)
660654
c.argument(
661655
"enable_app_routing_istio",
662656
options_list=["--enable-app-routing-istio", "--enable-ari"],
@@ -888,17 +882,6 @@ def load_arguments(self, _):
888882
'by that action.'
889883
)
890884
)
891-
c.argument(
892-
"enable_gateway_api",
893-
action="store_true",
894-
help="Enable managed installation of Gateway API CRDs from the standard release channel. "
895-
"Requires a Gateway API implementation to be installed on the cluster (e.g., Azure Service Mesh)."
896-
)
897-
c.argument(
898-
"disable_gateway_api",
899-
action="store_true",
900-
help="Disable managed installation of Gateway API CRDs."
901-
)
902885
c.argument(
903886
"enable_app_routing_istio",
904887
options_list=["--enable-app-routing-istio", "--enable-ari"],

src/azure-cli/azure/cli/command_modules/acs/custom.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,6 @@ def aks_create(
10361036
# node provisioning
10371037
node_provisioning_mode=None,
10381038
node_provisioning_default_pools=None,
1039-
# gateway api
1040-
enable_gateway_api=False,
10411039
# app routing istio
10421040
enable_app_routing_istio=False,
10431041
):
@@ -1235,9 +1233,6 @@ def aks_update(
12351233
# node provisioning
12361234
node_provisioning_mode=None,
12371235
node_provisioning_default_pools=None,
1238-
# gateway api
1239-
enable_gateway_api=False,
1240-
disable_gateway_api=False,
12411236
# app routing istio
12421237
enable_app_routing_istio=False,
12431238
disable_app_routing_istio=False,

src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@
5050
CONST_VIRTUAL_MACHINES,
5151
CONST_ACNS_DATAPATH_ACCELERATION_MODE_BPFVETH,
5252
CONST_ACNS_DATAPATH_ACCELERATION_MODE_NONE,
53-
CONST_MANAGED_GATEWAY_INSTALLATION_DISABLED,
54-
CONST_MANAGED_GATEWAY_INSTALLATION_STANDARD,
5553
CONST_APP_ROUTING_ISTIO_MODE_ENABLED,
5654
CONST_APP_ROUTING_ISTIO_MODE_DISABLED,
5755
)
@@ -6037,20 +6035,6 @@ def get_node_provisioning_default_pools(self) -> Union[str, None]:
60376035
"""
60386036
return self.raw_param.get("node_provisioning_default_pools")
60396037

6040-
def get_enable_gateway_api(self) -> bool:
6041-
"""Obtain the value of enable_gateway_api.
6042-
6043-
:return: bool
6044-
"""
6045-
return self.raw_param.get("enable_gateway_api", False)
6046-
6047-
def get_disable_gateway_api(self) -> bool:
6048-
"""Obtain the value of disable_gateway_api.
6049-
6050-
:return: bool
6051-
"""
6052-
return self.raw_param.get("disable_gateway_api", False)
6053-
60546038
def get_enable_app_routing_istio(self) -> bool:
60556039
"""Obtain the value of enable_app_routing_istio.
60566040
@@ -7464,19 +7448,6 @@ def set_up_ingress_web_app_routing(self, mc: ManagedCluster) -> ManagedCluster:
74647448

74657449
return mc
74667450

7467-
def set_up_ingress_profile_gateway_api(self, mc: ManagedCluster) -> ManagedCluster:
7468-
self._ensure_mc(mc)
7469-
if self.context.get_enable_gateway_api():
7470-
if mc.ingress_profile is None:
7471-
mc.ingress_profile = self.models.ManagedClusterIngressProfile()
7472-
if mc.ingress_profile.gateway_api is None:
7473-
mc.ingress_profile.gateway_api = (
7474-
self.models.ManagedClusterIngressProfileGatewayConfiguration(
7475-
installation=CONST_MANAGED_GATEWAY_INSTALLATION_STANDARD
7476-
)
7477-
)
7478-
return mc
7479-
74807451
def set_up_ingress_profile_app_routing_istio(self, mc: ManagedCluster) -> ManagedCluster:
74817452
"""Set up App Routing Istio configuration in ingress profile for the ManagedCluster object.
74827453
@@ -7655,8 +7626,6 @@ def construct_mc_profile_default(self, bypass_restore_defaults: bool = False) ->
76557626
mc = self.set_up_workload_auto_scaler_profile(mc)
76567627
# set up app routing profile
76577628
mc = self.set_up_ingress_web_app_routing(mc)
7658-
# set up gateway api
7659-
mc = self.set_up_ingress_profile_gateway_api(mc)
76607629
# set up app routing istio
76617630
mc = self.set_up_ingress_profile_app_routing_istio(mc)
76627631
# set up custom ca trust certificates
@@ -9156,31 +9125,6 @@ def _update_app_routing_nginx(self, mc: ManagedCluster, nginx) -> None:
91569125
else:
91579126
raise CLIError('App Routing must be enabled to modify the default nginx ingress controller.\n')
91589127

9159-
def update_ingress_profile_gateway_api(self, mc: ManagedCluster) -> ManagedCluster:
9160-
"""Update gateway api installation in the ingress profile for the ManagedCluster object.
9161-
9162-
:return: the ManagedCluster object
9163-
"""
9164-
self._ensure_mc(mc)
9165-
enable_gateway_api = self.context.get_enable_gateway_api()
9166-
disable_gateway_api = self.context.get_disable_gateway_api()
9167-
if enable_gateway_api and disable_gateway_api:
9168-
raise MutuallyExclusiveArgumentError(
9169-
"Cannot specify --enable-gateway-api and --disable-gateway-api at the same time."
9170-
)
9171-
if enable_gateway_api or disable_gateway_api:
9172-
if mc.ingress_profile is None:
9173-
mc.ingress_profile = self.models.ManagedClusterIngressProfile() # pylint: disable=no-member
9174-
if mc.ingress_profile.gateway_api is None:
9175-
mc.ingress_profile.gateway_api = (
9176-
self.models.ManagedClusterIngressProfileGatewayConfiguration() # pylint: disable=no-member
9177-
)
9178-
if enable_gateway_api:
9179-
mc.ingress_profile.gateway_api.installation = CONST_MANAGED_GATEWAY_INSTALLATION_STANDARD
9180-
elif disable_gateway_api:
9181-
mc.ingress_profile.gateway_api.installation = CONST_MANAGED_GATEWAY_INSTALLATION_DISABLED
9182-
return mc
9183-
91849128
def update_ingress_profile_app_routing_istio(self, mc: ManagedCluster) -> ManagedCluster:
91859129
"""Update App Routing Istio configuration in ingress profile for the ManagedCluster object.
91869130
@@ -10156,8 +10100,6 @@ def update_mc_profile_default(self) -> ManagedCluster:
1015610100
mc = self.update_node_resource_group_profile(mc)
1015710101
# update AI toolchain operator
1015810102
mc = self.update_ai_toolchain_operator(mc)
10159-
# update gateway api
10160-
mc = self.update_ingress_profile_gateway_api(mc)
1016110103
# update app routing istio
1016210104
mc = self.update_ingress_profile_app_routing_istio(mc)
1016310105
# update bootstrap profile

0 commit comments

Comments
 (0)