gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

conformance: support testing mesh implementations

Open howardjohn opened this issue 2 years ago • 4 comments

Currently, the conformance tests use a pretty simple echoserver deployment and make HTTP calls from the go test runner to the Gateway IP (which must be reachable from the test runner).

For testing mesh implementations (and in general, but especially mesh), this may not be sufficient. Since we are testing calls to in-cluster Services, we typically cannot reach these from the test runner (out of the cluster). Even mechanism like port-forward typically do not work as they traverse a different network path than real in-cluster calls.

The conformance tests should be enhanced to support these.

howardjohn avatar Aug 18 '22 15:08 howardjohn

I haven't looked at any other meshs, but I am quite familiar with how Istio solves this. We have a standard echo client/server that we use for almost all testing. This has support for all the protocols we support and configuring a wide range of requests parameters (more than curl in some cases - we have logic to send 'illegal' requests as well for testing, overriding ALPN, etc).

The key for testing mesh though is each has a gRPC 'control' endpoint. Each pod we deploy is port-forwarded to from the go test, and when we want to make that pod send a request we send it a ForwardRequest message. This triggers it to make a request (with whatever attributes we want), and then send the response back to the test.

howardjohn avatar Aug 18 '22 15:08 howardjohn

cc @robscott

howardjohn avatar Aug 18 '22 15:08 howardjohn

OSM does something similar; the Go test runner does an exec on the pod to perform the necessary HTTP request. This is definitely something we need to prepare for when it comes to mesh conformance

keithmattix avatar Aug 18 '22 15:08 keithmattix

/assign

abhijit-dev82 avatar Aug 30 '22 14:08 abhijit-dev82

In the GAMMA meeting we had some consensus to use the echo server/client Istio is using and move/package it in an Istio agnostic way for use by the gateway-api.

howardjohn avatar Nov 02 '22 21:11 howardjohn

/assign @keithmattix

We've been discussing this a bit over the past few GAMMA meetings, and Keith is starting work on a framework to allow testing GAMMA functionality for mesh implementations.

mikemorris avatar Jan 17 '23 16:01 mikemorris

This issue should be removed from the Implementable milestone in favor of #1686

keithmattix avatar Feb 07 '23 21:02 keithmattix

@keithmattix what's the additional context to the change? Is that this should be closed in favor of that one or just that this one will be for later?

shaneutt avatar Feb 07 '23 21:02 shaneutt

Not closed; this issue just represents actually adding mesh capabilities to the conformance test framework and the other one is the testing plan. Only the testing plan is required for 0.7.0

keithmattix avatar Feb 07 '23 22:02 keithmattix

Sounds good thanks!

shaneutt avatar Feb 07 '23 23:02 shaneutt