k8sgateway / k8sgateway

The Cloud-Native API Gateway and AI Gateway
https://k8sgateway.io/
Apache License 2.0
4.13k stars 449 forks source link

Create mechanism to inject helm settings in e2e tests #10374

Open sheidkamp opened 4 days ago

sheidkamp commented 4 days ago

Do you have a suggestion for code improvement or tracking existing technical debt? Please describe.

The Split Webhook Validation tests rely on a testhelper to run Helm commands to update the gloo install.

More tests may need to do this in the future.

Currently these types of tests can not be run from other projects that import k8sgateway as a dependency.

For the moment, a separate SuiteRunner has been created for this situation.

Describe the solution you'd like

Create a way to pass a testhelper/helm values root to the tests.

Additional Context

No response

sam-heilbron commented 4 days ago

Something to keep in mind when we solve this:

https://github.com/solo-io/gloo/blob/e2ca0280c1828c5a7131d5e4c398770fc279088c/test/kubernetes/e2e/test.go#L25: The testHelper is a wrapper around glooctl, that we had used because it existed and allowed us to avoid rebuilding a tool. However, we know it has limitations, and would rather rely on the CLI directly if possible, to avoid building logic into our tests that our customers can't used

sheidkamp commented 4 days ago

There is a suggested approach here, to add the testhelper to the TestInstallation, which would be solve half of the issue.

The TestInstallation may be a good place to specify a Helm prefix as well