-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(conf_loader): load all WASM filters from conf path #10353
Conversation
I'm not sure but do you think it is reasonable to add an explicit "KONG_WASM" or similar configuration option to globally enable/disable wasm support in Kong, at least until it is stable enough that we deem it to be production-grade? |
The tech preview branch had the |
I lean towards having a boolean flag that serves as the main flag to enable/disable WASM support. The rationale is that sometimes the operator would like to disable WASM (for any reason) without removing the .wasm bytecode files, which may be baked into the container image, and changing the container image would require more hassle than is strictly necessary. |
Having the wasm files baked in the container image was something I wasn't considering. So, yes, it makes sense to have a boolean flag. |
@@ -581,7 +581,7 @@ local CONF_PARSERS = { | |||
max_queued_batches = { typ = "number" }, | |||
|
|||
wasm = { typ = "boolean" }, | |||
wasm_modules = { typ = "array" }, | |||
wasm_filters_path = { typ = "string" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're leaning towards using the boolean wasm = on|off
setting to toggle wasm, would it make sense to remove wasm_filters_path
as a setting and use a standardized location (i.e. {{KONG_PREFIX}}/wasm_filters
) instead?
We can always add wasm_filters_path
later on if there is a compelling case to use a non-default location.
@locao what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion on this. I like a lot of knobs to adjust even if they were never touched, but that's not how a good product is built 😅
For the sake of keeping things simpler, I'd say let's try without wasm_filters_path
and see if we miss using it during development phase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can imagine it being kind of annoying for our integration tests if the path is not configurable, but in my opinion this gives us the incentive to make sure symlinks are supported. Ideally something like this should be supported out-of-the box:
ln -s \
/path/to/git/kong/spec/fixtures/wasm/a/b/c/d/my_filter.wasm \
/path/to/my_kong_prefix/wasm_filters/my_filter.wasm
Co-authored-by: Harry <harrybagdi@gmail.com>
c00b894
to
7dcdf73
Compare
Summary
Load WASM filters from configured path.
Checklist
Full changelog
Issue reference
KAG-500