Skip to content

Add support for K8S Gateway API (httpRoute config) #3661

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

Merged
merged 14 commits into from
May 17, 2025

Conversation

manics
Copy link
Member

@manics manics commented Apr 30, 2025

@Kyrremann I hope you don't mind, but I've rebased your PR #3222 and updated it with v1 instead of v1beta, removed the GKE specific resource, and added some tests.


test-gateway-ingress:
# The main test configures autohttps, but this conflicts with testing
# ingress/gateway which assume they can directly connect to proxy-public
Copy link
Member Author

@manics manics Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it should be possible to have autohttps working, but that would only be used for internal connections between the traefik ingress/gateway controller and the autohttps/proxy pod which effectively means it's no use, since the certificate is designed for external connections.

The certificate for external connections has to be managed by the gateway or ingress controller, not autohttps.
https://gateway-api.sigs.k8s.io/guides/tls/

I don't think autohttps is useful unless using a TCP LoadBalancer which passes network traffic straight through.

Copy link
Member Author

@manics manics Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rereading https://gateway-api.sigs.k8s.io/guides/tls/#tls-configuration there's a Passthrough mode, but this is Experimental and I don't see what benefit it offers for autohttps- it adds unnecessary complexity.

@consideRatio consideRatio changed the title Add support for K8S Gateway API Add support for K8S Gateway API (httpRoute config) May 17, 2025
Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Kyrremann and @manics! This looks right and sound!

I pushed two commits and think this could be ready to merge. What do you think?

I was thinking if it made sense to allow both ingress and httproute, but I think it does - right? I'm thinking there could be an ingress controller next to a gateway controller, and they both could help facilitate inbound connections to some k8s Service's endpoints.

@manics
Copy link
Member Author

manics commented May 17, 2025

Thanks for the additions! Both gateway and ingress can be used together, in the same way that you can have multiple ingresses for the same service. It'll be confusing for other admins so not recommended unless you really need it.

@consideRatio consideRatio merged commit a9edbb1 into jupyterhub:main May 17, 2025
16 checks passed
@manics manics deleted the gateway branch May 17, 2025 14:25
consideRatio pushed a commit to jupyterhub/helm-chart that referenced this pull request May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants