kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.34k stars 8.23k forks source link

Implement GatewayAPI in Ingress NGINX #7517

Open rikatz opened 3 years ago

rikatz commented 3 years ago

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:

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 :)

bishtsaurabh5 commented 3 years ago

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 commented 3 years ago

@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

sunlintong commented 2 years ago

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

rikatz commented 2 years ago

@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 :)

tao12345666333 commented 2 years ago

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.

sunlintong commented 2 years ago

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

bishtsaurabh5 commented 2 years ago

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

tao12345666333 commented 2 years ago

/assign

@bishtsaurabh5 sure, sorry for the long delay.

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

strongjz commented 2 years ago

/triage accepted /priority longterm-important

k8s-ci-robot commented 2 years ago

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

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/7517#issuecomment-1157010028): >/triage accepted >/priority longterm-important > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
strongjz commented 2 years ago

/priority important-longterm

one day ill have the memorized and then it will change

jemag commented 2 years ago

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.

tao12345666333 commented 2 years ago

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

k8s-triage-robot commented 1 year ago

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:

You can:

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

/lifecycle stale

tao12345666333 commented 1 year ago

/remove-lifecycle stale

mumubin commented 1 year ago

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

PierreBeucher commented 9 months ago

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 !

siegenthalerroger commented 8 months ago

@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

strongjz commented 6 months ago

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

The initial release will support:

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

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

jimangel commented 3 months ago

Not sure if 100% applicable, but there is a bit of conversation here about Gateway API CRD / upstream complexities for helm charts: https://github.com/kubernetes-sigs/gateway-api/issues/1590.

I think it's important to consider the implications of Gateway API being outside of core k/k and the potential reality of multiple Gateway API implementations and overlap between CRDs / versions / upgrades.

I'll watch the video to see if it's been covered already, but I've been bit by this complexity that doesn't exist with Ingress (as a "batteries included" core resource vs. BYO implementation).

strongjz commented 2 months ago

Not sure if 100% applicable, but there is a bit of conversation here about Gateway API CRD / upstream complexities for helm charts: https://github.com/kubernetes-sigs/gateway-api/issues/1590.

I think it's important to consider the implications of Gateway API being outside of core k/k and the potential reality of multiple Gateway API implementations and overlap between CRDs / versions / upgrades.

I'll watch the video to see if it's been covered already, but I've been bit by this complexity that doesn't exist with Ingress (as a "batteries included" core resource vs. BYO implementation).

Appreciate the word of caution. We're still working on the control plane data plane split, and then we are going full bore into this.