knative-extensions / net-gateway-api

Integration between Knative and service-apis (ingress v2) for Knative Ingress migration.
Apache License 2.0
27 stars 28 forks source link

Add cilium to conformance testing #553

Open acelinkio opened 1 year ago

acelinkio commented 1 year ago

Please add Cilium into knative's testing of the gatewayapi.

Cilium is a CNI, kube-proxy replacement, sidecar-less service mesh, load balancer, and observability tool that also offers a gateway controller. Cilium 1.15 will support all gateway-api features except for one as seen in their conformance report, https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/reports/v0.8.1/cilium-cilium.yaml.

Cilium is growing in popularity and leverages some of the most recent Linux features. Greatly appreciate if it could be added and regularly tested against Knative!

bittermandel commented 11 months ago

Happy to help out with the implementation of this! We're looking to use Cilium for Gateway API and it feels like the best way to make it work with Knative.

acelinkio commented 9 months ago

hey @tomaszkiewicz, thanks for opening the filters issue. I have applied that filters fix but not sure how to configure the rest of this project to work with Cilium. Would you happen to have an example of how you setup Knative?

I had kourier ingress working, but not understanding how to get the gateway setup functioning. If anyone has any working examples that would be great!

my setup: https://github.com/acelinkio/argocd-homelab/blob/main/manifest/knative-serving.yaml

tomaszkiewicz commented 8 months ago

Hi, sure: I simply followed a readme on this repository to deploy both KNative as well as all the settings, then fine tuned some of them in config-gateway config map:

 visibility: |                                                   
   ExternalIP:                                                   
     class: cilium                                               
     gateway: default/cilium-gateway                             
     service: default/cilium-gateway-cilium-gateway              
   ClusterLocal:                                                 
     class: cilium                                               
     gateway: default/cilium-gateway                             
     service: default/cilium-gateway-cilium-gateway                                               

Then I created a gateway object like that:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
  name: cilium-gateway
spec:
  gatewayClassName: cilium
  listeners:
    - protocol: HTTP
      port: 80
      name: web
acelinkio commented 7 months ago

Hey @tomaszkiewicz ,

I have Cilium/Knative working! However was wondering if you found a way to do path based routing to a Knative service.? ie, /api/v1 -> microservice1. /api/v2/ -> microservice2

There is minimal flexibility on the HTTPRoutes that the net-gateway-api creates.

tomaszkiewicz commented 7 months ago

I doubt it's possible in the current version...

dprotaso commented 6 months ago

if you found a way to do path based routing to a Knative service.? ie, /api/v1 -> microservice1. /api/v2/ -> microservice2

We have examples with Istio where you route the external gateway traffic to the internal gateway based on paths and rewrite the host header

See: https://github.com/knative/docs/blob/main/code-samples/serving/knative-routing-go/routing.yaml

I'm going to mark these comments off topic - feel free to open an new issue regarding this in here or in knative/serving repo

dprotaso commented 6 months ago

Depends on https://github.com/knative-extensions/net-gateway-api/issues/621

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

blackliner commented 2 months ago

https://github.com/cilium/cilium/issues/29080 has been closed/merged, what does this mean for this issue?

dprotaso commented 2 months ago

/lifecycle frozen

Hey @blackliner it would be good for someone to take on this issue and add cillium testing. Then we can see what's broken and see if there's some resolution.

To layout the work you can look at what I did for envoy gateway

First I added optional presubmit jobs to our CI here https://github.com/knative/infra/pull/451. This will run against pull requests.

With that in place you can add all the cillium stuff to this repo - the envoy gateway example is here https://github.com/knative-extensions/net-gateway-api/pull/738

I'm a bit busy with other stuff to take this on - but I can assist