Skip to content
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

Challenge with gateway.networking.k8s.io/gateway-name label for merged Gateways #3365

Closed
zhaohuabing opened this issue Sep 27, 2024 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@zhaohuabing
Copy link
Contributor

zhaohuabing commented Sep 27, 2024

According to GEP-1762, it requires that:

MUST label all generated resources (Service, Deployment, etc) with gateway.networking.k8s.io/gateway-name: my-gateway (where my-gateway is the name of the Gateway resource).

When implementing this in Envoy Gateway, we encounter a challenge with the generated resources that represent multiple merged Gateways. Currently, we concatenate the Gateway names like "gateway.networking.k8s.io/gateway-name: gateway1_gateway2". It would be beneficial to define a canonical way in the GEP for guidance.

Alternatively, we could consider using gateway.networking.k8s.io/gatewayclass-name: my-gatewayclass for generated resources of merged Gateways.

@zhaohuabing zhaohuabing added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 27, 2024
@zhaohuabing zhaohuabing changed the title Issue with gateway.networking.k8s.io/gateway-name label for merged Gateways Challenge with gateway.networking.k8s.io/gateway-name label for merged Gateways Sep 27, 2024
@howardjohn
Copy link
Contributor

FWIW in Istio we have one primary gateway, the rest are merged into it. We use that as the label.

otherwise, not sure how you implement things like Gateway.spec.address?

@zhaohuabing
Copy link
Contributor Author

zhaohuabing commented Sep 29, 2024

Hi @howardjohn By merged Gateway, I mean Envoy Gateway deploys multiple Gateways resources onto a single EnvoyProxy fleet. There's no "primary gateway", each Gateway is still a standalone resource. Regarding Gateway.spec.address, EG uses the first address for ClusterIP type and all addresses for LoadBalancer type.

Could you please point me to the docs about Istio "primary gateway"? I didn't find it on this page Configuring ingress using a gateway.

@howardjohn
Copy link
Contributor

Regarding Gateway.spec.address, EG uses the first address for ClusterIP type and all addresses for LoadBalancer type.

So the 'first' one is the primary one essentially..?

For istio
https://istio.io/latest/docs/tasks/traffic-management/ingress/gateway-api/#automated-deployment is the doc. You cannot merge automated gateways, only 0 or 1 automated and N manual. So at most one thing controls the infrastructure.

@arkodg
Copy link
Contributor

arkodg commented Sep 30, 2024

@zhaohuabing, for Envoy Gateway, the gateway.networking.k8s.io/gateway-name label doesnt apply to the mergeGateways case since the paramatersRef being taken into consideration is the one in GatewayClass and not in Gateway (infrastructure.parametersRef is nil)

@zhaohuabing
Copy link
Contributor Author

@zhaohuabing, for Envoy Gateway, the gateway.networking.k8s.io/gateway-name label doesnt apply to the mergeGateways case since the paramatersRef being taken into consideration is the one in GatewayClass and not in Gateway (infrastructure.parametersRef is nil)

Yes, agree. We don't need to add this label to the merged gateway. I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants