-
Notifications
You must be signed in to change notification settings - Fork 228
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
add wasm runtimes (embedded and nodejs) in kpt #3450
Conversation
6b05085
to
b366ca4
Compare
a79c405
to
d7e233a
Compare
Some small nits, but this is pretty close I think. I think sending the go 1.19 and ioutil -> os changes separately would help make this much more reviewable. |
These changes are really from #3447. I cherry picked the commits to make CI happy. This PR requires CGO, but it seems we cross compilation doesn't work nicely with CGO. To workaround it, We may need to build it in container for darwin and windows. @justinsb Any suggestions or prior arts in other k8s projects? |
d7e233a
to
608c22a
Compare
1631ea7
to
76808e3
Compare
cfd01cd
to
fe6b6ba
Compare
75b874e
to
67aed17
Compare
I just realized that a few comments have not been addressed. I missed them until I resolved other comments. I will resolve them tomorrow. I have move part of |
6d3ece5
to
9342e90
Compare
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.
lgtm, defer to @justinsb for final approval
Two small things, but lgtm! |
9342e90
to
3d84647
Compare
49f5cef
to
045e496
Compare
* add wasm runtime in kpt * add testcase for wasm eval
This PR introduces 2 commands:
kpt alpha wasm push
andkpt alpha wasm pull
:This PR added 2 wasm runtimes (one embedded wasmtime and node.js) in kpt:
processResourceList
in the globals.To use it in Kptfile:
Then run
kpt fn render --allow-alpha-wasm
with 2 functions.KPT_FN_WASM_RUNTIME
can be used to select a runtime.user 0m44.559s
sys 0m1.047s
user 0m1.125s
sys 0m0.498s
This PR requires CGO, it seems cross compilation doesn't work nicely with CGO. We are using GitHub actions to ensure it can be compiled on other OS. #3463 blocks it from working on windows.
To produce wasm artifacts, please take a look at GoogleContainerTools/kpt-functions-catalog#898.
Depends on #3470