apisix-ingress-controller
apisix-ingress-controller copied to clipboard
feat: GatewayAPI Support
Gateway API is an open source project managed by the SIG-NETWORK
community. It's is a collection of resources that model service networking
in Kubernetes. These resources - GatewayClass
,Gateway
, HTTPRoute
,
TCPRoute
, Service
, etc - aim to evolve Kubernetes service networking through
expressive, extensible, and role-oriented interfaces that are implemented by
many vendors and have broad industry support.
The following design goals drive the concepts of the Gateway API. These demonstrate how Gateway aims to improve upon current standards like Ingress.
- Role-oriented - Gateway is composed of API resources which model organizational roles that use and configure Kubernetes service networking.
- Portable - This isn't an improvement but rather something that should stay the same. Just as Ingress is a universal specification with numerous implementations, Gateway API is designed to be a portable specification supported by many implementations.
- Expressive - Gateway API resources support core functionality for things like header-based matching, traffic weighting, and other capabilities that were only possible in Ingress through custom annotations.
- Extensible - Gateway API allows for custom resources to be linked at various layers of the API. This makes granular customization possible at the appropriate places within the API structure.
Some other notable capabilities include:
- GatewayClasses - GatewayClasses formalize types of load balancing implementations. These classes make it easy and explicit for users to understand what kind of capabilities are available via the Kubernetes resource model.
- Shared Gateways and cross-Namespace support - They allow the sharing of load balancers and VIPs by permitting independent Route resources to bind to the same Gateway. This allows teams (even across Namespaces) to share infrastructure safely without direct coordination.
- Typed Routes and typed backends - The Gateway API supports typed Route resources and also different types of backends. This allows the API to be flexible in supporting various protocols (like HTTP and gRPC) and various backend targets (like Kubernetes Services, storage buckets, or functions).
docs here: https://gateway-api.sigs.k8s.io/
I think we should add support for Gateway API. To accomplish this, the following steps are required:
- [x] Add a configuration to enable this mode.
- [x] #789
- [x] Implement
Gateway
controller loop and update status.- [x] #789
- [x] Implement
GatewayClass
controller loop and update status.- [x] #1079
- [x] Implement
HTTPRoute
controller loop and translate to Apache APISIX.- [x] #1037
- [x] Implement
TLSRoute
controller loop and translate to Apache APISIX.- [x] #1087
- [ ] Implement
TCPRoute
controller loop and translate to Apache APISIX. (assigned to @AlinsRan) - [ ] Implement
UDPRoute
controller loop and translate to Apache APISIX. (assigned to @stillfox-lee )
Indeed. +1 from me.
Hope we can start to support this feature next month.
As the gateway APIs 0.4.0
RC1 was released (support v1alpha2
), we may start to support it just from v1alpha2
.
Is it already started?
Yes, it has already started.
@tao12345666333 Can you split it into many smaller tasks? I'm interesting in it.
Sure I will update the description.
Hi @tao12345666333 , I can help to implement TCPRoute
. Can you assign it to me?
@stillfox-lee sorry, The TCPRoute
task has been publised through the OSPP project. [1]
And @AlinsRan has already claimed the task. He will finish the job in two months.
If you are interested, can you help implement UDPRoute
?
1: https://summer-ospp.ac.cn/#/org/prodetail/228020146
@stillfox-lee sorry, The
TCPRoute
task has been publised through the OSPP project. [1] And @AlinsRan has already claimed the task. He will finish the job in two months.If you are interested, can you help implement
UDPRoute
?1: https://summer-ospp.ac.cn/#/org/prodetail/228020146
Sure. Please assign it to me.
@stillfox-lee assigned! (I have updated the issue description) Thanks!
@tao12345666333 hello, this means gateway api can replace ingress in the future ? so we need add this feature
@tao12345666333 hello, this means gateway api can replace ingress in the future ? so we need add this feature
yes. Gateway API can replace Ingress.
But for now it's on beta status, will need more time to do this.
@tao12345666333 HI, tao,
Looking at the current task, it looks like the task is closed except for TCPRoute and UDPRoute. Can I use GatewayAPI in production now?
In particular, I wonder if HTTPRoute
resource can be recognized by an apisix controller.
Can I use GatewayAPI in production now?
@heesuk-ahn no, APISIX Ingress support for Gateway API is still in beta stage, I suggest you try it in test environment and give us some feedback.
But I don't recommend using it in a production environment.
Once we think that the code in this part is complete enough and the feedback from the community is good, we will upgrade it to the stable stage. At that time, it will be safer to use it in a production environment.
In particular, I wonder if HTTPRoute resource can be recognized by an apisix controller.
Yes, you can try it
@tao12345666333
Thanks for the reply! For the time being, I will use GatewayAPI for test purposes and use the existing ApisixRoute for production.
I'll have to migrate it once it's stable enough to be deployed to production. 👀 I'll try it out and give you feedback. :)
Hi @tao12345666333 , I'm trying to use traffic-split
plugin to implement UDPRoute
traffic control with weight
logic like HTTPRoute
. Then I go through the doc, those use cases are all about HTTP. Can traffic-split
plugin work with UDP protocol like HTTP protocol?
If traffic-split
plugin didn't support for UDP protocol. How should I implement it? Thanks.
Can
traffic-split
plugin work with UDP protocol like HTTP protocol?
Currently this plugin does not yet support UDP protocol, which requires porting of this capability in APISIX.
If
traffic-split
plugin didn't support for UDP protocol. How should I implement it? Thanks.
There should be no way IRRC.
@stillfox-lee But we may be able to have some discussions, if it is convenient for you, you can contact me at [email protected]
and we can schedule a meeting to chat
@stillfox-lee But we may be able to have some discussions, if it is convenient for you, you can contact me at
[email protected]
and we can schedule a meeting to chat
Sure. I will contact you later. Thanks.
Currently our first phase of tasks has been fully realized, and we currently cover all major resources. Thanks all!!!
In the next phase, we need to continue to refine these implementations, adding more specific capabilities.
Such as:
- [ ] https://github.com/apache/apisix-ingress-controller/issues/1349
- [ ] HTTPRoute
- [ ] Filters https://gateway-api.sigs.k8s.io/api-types/httproute/#filters-optional
- [ ] BackendRefs https://gateway-api.sigs.k8s.io/api-types/httproute/#backendrefs-optional ... And more
@tao12345666333 Hello. I'm thinking about using it in production. It seems that another phase(https://github.com/apache/apisix-ingress-controller/pull/1440) is almost done and I also noticed that the document has been added recently. (https://github.com/apache/apisix-ingress-controller/issues/1597)
Is this going to be released soon?
Thank you in advance :)
@yujinchoi-94 #1440 has been added to my queue.
It will be introduced in v1.7. We plan to release v1.7 at the end of March.
All tasks recorded in this issue have been completed, and I will now close it.