bug: GatewayNamespace mode fails to handle Gateways across multiple namespaces #5952
Labels
area/infra-mgr
Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet.
kind/bug
Something isn't working
Milestone
When using GatewayNamespace mode with multiple Gateway resources across different namespaces, the Envoy Gateway controller incorrectly creates Envoy Proxy Deployments/Services for all Gateways in the first namespace it processes, rather than in their respective namespaces as expected. This leads to a situation where resources from one namespace are incorrectly deployed into another namespace, breaking the isolation that GatewayNamespace mode is intended to provide.
Environment
Reproduction Steps
This issue can be reproduced by creating Gateway resources in multiple namespaces while running Envoy Gateway in GatewayNamespace mode.
Detailed setup procedure
Click to expand detailed steps
Create a Kind cluster
Install Gateway API CRDs
Install cert-manager
Install Envoy Gateway with GatewayNamespace mode
helm install eg oci://docker.io/envoyproxy/gateway-helm \ --version v0.0.0-latest \ -n envoy-gateway-system \ --create-namespace \ --set config.envoyGateway.provider.kubernetes.deploy.type=GatewayNamespace kubectl wait --for=condition=available --timeout=600s deployment/envoy-gateway -n envoy-gateway-system
Create GatewayClass
Create test namespaces
Create Gateway resources in different namespaces
Wait for resources to be created
Check Gateway status
Check where Deployments and Services were created
Expected Behavior
When using GatewayNamespace mode, each Gateway resource should have its corresponding Envoy Proxy Deployment and Service created in the same namespace as the Gateway resource. Specifically:
ns1
, an Envoy Proxy Deployment and Service should be created in namespacens1
.ns2
, an Envoy Proxy Deployment and Service should be created in namespacens2
.This would maintain proper namespace isolation between resources.
Actual Behavior
All Envoy Proxy resources are incorrectly created in the first namespace (
ns1
), regardless of which namespace the Gateway resource belongs to:Note that the deployment
envoy-ns2-eg-341c9697
and serviceenvoy-ns2-eg-341c9697
are incorrectly created in namespacens1
instead ofns2
. This violates the namespace isolation principle of the GatewayNamespace mode.The controller logs show that it recognizes Gateways in both namespaces, but it fails to create the Envoy resources in the correct namespace:
Click to expand controller logs
Related Issues
The text was updated successfully, but these errors were encountered: