-
Notifications
You must be signed in to change notification settings - Fork 647
feat(envoyextensionpolicy): Implement TLS configuration for WASM code source. #7865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Tested and working with the following (certain elements removed for brevity): apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyExtensionPolicy
spec:
wasm:
- name: wasm-image-test
code:
type: Image
image:
url: registry.example.com/library/wasm-filter:latest
tls:
caCertificateRef:
name: existing-cluster-trust-bundle
group: ""
kind: ClusterTrustBundle |
… source. Signed-off-by: Anton Chernev <[email protected]>
Signed-off-by: Anton Chernev <[email protected]>
|
@achernev Thanks for picking this up! Can we add an e2e test for the https wasm source? |
|
@zhaohuabing Will do. A couple of questions:
|
You should be able to run WASM e2e test using " E2E_RUN_TEST=WasmHTTPCodeSource make e2e", it'll create a local kind cluster, install EG, and run the test.
Yes, you can modify the existing test: |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (51.23%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7865 +/- ##
==========================================
- Coverage 72.82% 72.70% -0.13%
==========================================
Files 235 235
Lines 35176 35332 +156
==========================================
+ Hits 25618 25688 +70
- Misses 7743 7817 +74
- Partials 1815 1827 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Anton Chernev <[email protected]>
Signed-off-by: Anton Chernev <[email protected]>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@zhaohuabing Added an HTTP TLS e2e test. Had to expand the resource indexer a bit to include objects referenced by the code source configuration because it was only considering ConfigMaps from the LUA section. With regard to the Codecov report: the lines not covered by tests are the fallback to an empty cert pool when |
Signed-off-by: Anton Chernev <[email protected]>
|
@zhaohuabing Regarding the failing test called This is to say nothing of the fact that the logic in func AlmostEquals(actual, expect, offset int) bool {
upper := actual + offset
lower := actual - offset
if expect < lower || expect > upper {
return false
}
return true
}With this run's success number (49), that means that the numbers are: upper = 49 + 3 = 52, lower = 49 - 3 = 46, expect = 50 * 0.9 = 45, 45 < 46 is still a fail, hence the outcome. I am not sure why the |
|
Hi @achernev No worries. These tests are flaky and they are not related to this PR. I'll review the PR later when I get a moment. Thanks for your patience! |
Signed-off-by: Anton Chernev <[email protected]>
Signed-off-by: Anton Chernev <[email protected]>
|
@zhaohuabing Apologies for the delay here. I've fixed the test that broke and added a couple more to cover for most of the changes in the indexer. |
What type of PR is this?
This implements an existing API.
What this PR does / why we need it:
This change wires in the existing API for configuring TLS when obtaining WASM code from a remote source. It covers both HTTP and OCI sources, and expands the feature to support
ClusterTrustBundlesalongsideConfigMapsandSecrets.The only change under
/apiis to remove the+notImplementedHideflags from theWasmCodeSourceTLSConfigparts of the configuration.Which issue(s) this PR fixes:
Fixes #4466.
Release Notes: Yes