ingress-nginx icon indicating copy to clipboard operation
ingress-nginx copied to clipboard

Implement GatewayAPI in Ingress NGINX

Open rikatz opened this issue 4 years ago • 13 comments

We need to start thinking about Gateway API (https://gateway-api.sigs.k8s.io/) in Ingress NGINX.

A good approach here would be to understand the internal controller data model (https://github.com/kubernetes/ingress-nginx/blob/main/internal/ingress/types.go) and how can we reconcile Gateway API objects into the internal model.

I'm aware that probably we will need some evolution into this datamodel, but I would like to have a minimum surface change and keep some things like template generation (nginx.conf), some annotations not covered by GatewayAPI model and other stuff the way they are.

So, maybe a good first approach would be:

  • Reconcile "HTTPRoute" objects into "Locations" and Servers
  • Reconcile "Gateway" objects into something (need to understand the API better)

An alpha1 version of this would be just available to do this reconciliations. No status, no feedback to users, just turn the objects above into a structure that Ingress can understand.

Also we can look into previous arts like Contour (https://projectcontour.io/guides/gateway-api/) and HAProxy to see what lessons learned from them we can apply here :)

rikatz avatar Aug 21 '21 12:08 rikatz

I think they are gonna soon release the v1alpha2 version , we can start implementing that since there are significant changes as compared to the v1alpha1 version

bishtsaurabh5 avatar Sep 26 '21 19:09 bishtsaurabh5

@rikatz I have initiated a thread on gateway api slack about how different resources could be mapped to the existing ingress nginx resources https://kubernetes.slack.com/archives/CR0H13KGA/p1632688608134500

bishtsaurabh5 avatar Sep 28 '21 12:09 bishtsaurabh5

As https://github.com/kubernetes-sigs/gateway-api/releases/tag/v0.4.0, gateway api v1alpha2 has been released. Can we start implementing this :)

sunlintong avatar Feb 15 '22 03:02 sunlintong

@sunlintong we are a bit overloaded with some fixes that needs to be released, but PRs are always welcome :D @tao12345666333 is working on the design of this, feel free to reach us on Slack and jump in into the design and implementation :)

rikatz avatar Feb 15 '22 13:02 rikatz

Yes, I'm working on the design, and I'm expected to send out a specific design draft and task split in the near future.

tao12345666333 avatar Feb 15 '22 13:02 tao12345666333

Thanks for Reply, maybe I can get involved too and make it happen together :D

sunlintong avatar Feb 16 '22 12:02 sunlintong

@tao12345666333 I am also interested in working on Gateway API implementation . Can you please include me as well while sending out the draft proposal :)

bishtsaurabh5 avatar Feb 16 '22 12:02 bishtsaurabh5

/assign

@bishtsaurabh5 sure, sorry for the long delay.

I will finish the proposal as soon as possible and send it out.

tao12345666333 avatar Mar 22 '22 12:03 tao12345666333

/triage accepted /priority longterm-important

strongjz avatar Jun 15 '22 22:06 strongjz

@strongjz: The label(s) priority/longterm-important cannot be applied, because the repository doesn't have them.

In response to this:

/triage accepted /priority longterm-important

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jun 15 '22 22:06 k8s-ci-robot

/priority important-longterm

one day ill have the memorized and then it will change

strongjz avatar Jun 15 '22 22:06 strongjz

Is the intent to implement the Gateway in this repository or create a new one to host that code?

If a new repository is created for this purpose, this could be a good opportunity to try and differentiate the project from the NginxInc one (https://github.com/nginxinc/nginx-kubernetes-gateway) and perhaps avoid some of the confusion going around (see: https://github.com/kubernetes/ingress-nginx/issues/7554 and https://github.com/nginxinc/kubernetes-ingress/issues/1910)

Also, not sure about the current state of this endeavor, but eventually it would be nice to have a reference here : https://gateway-api.sigs.k8s.io/implementations/ so that current users of the ingress controller can again see a choice between this community one and the NginxInc one.

jemag avatar Jul 27 '22 22:07 jemag

Thanks for your comment.

We plan implement Gateway API in this repo.

Currently we are doing some higher priority things like splitting cp and dp

tao12345666333 avatar Aug 07 '22 18:08 tao12345666333

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Nov 05 '22 18:11 k8s-triage-robot

/remove-lifecycle stale

tao12345666333 avatar Nov 05 '22 21:11 tao12345666333

Flagger can support sticky session if ingress-nginx support gateway api, it there a plan to support it?

https://github.com/fluxcd/flagger/issues/1487

mumubin avatar Sep 11 '23 09:09 mumubin

Implementation of Gateway API is becoming an important choice criteria for an Ingress Controller. Most tools on the market support it in beta/preview mode. Do you have plan to support it ? Thanks !

PierreBeucher avatar Dec 29 '23 08:12 PierreBeucher

@PierreBeucher they have mentioned, that they have it on their roadmap, however they first want to work on splitting the control- and data-plane before adding a new control-plane for the GatewayAPI

siegenthalerroger avatar Jan 16 '24 15:01 siegenthalerroger

Per our talk at Kubecon Paris 2024. We will start with our implementation.

The initial release will support:

  • GatewayClass
  • Gateway
  • HTTPRoute

More discussion in our talk here https://www.youtube.com/watch?v=8qaU9SX-IdI

https://docs.google.com/presentation/d/1IQEmJ4FWuy9i57A11lRARdfqDtrMLuJ79mrPv8VvE94/edit?usp=sharing

strongjz avatar Mar 28 '24 15:03 strongjz