Closed dmvolod closed 1 year ago
in the middle of release again, so if no one else gets back to you and I don't by Saturday.. nag me!
I'm happy about this, but really think another maintainer should chime in one way or another as it is a major change.
A couple clarifying questions that may help:
- Can you show a working PR on another open source project that uses this?
- Do you foresee any issues with multiple plugins?
Yes, sure. I'm working on the Kubernetes client proxy host functions which will utilize current approach. Will try to share soon
@codefromthecrypt build very early and simple draft of the wasm-k8s-host-proxy build on top the current plugin approach and this PR fix
@dmvolod great.. one last request before I nag others to look at this. I'll be at wasmio with others, so it will be easy to get people to look. Can you add a README to your example, reviewing what it is doing, and how to run this (apart from invoking protoc?). I'm assuming you won't be at wasmio to showcase this yourself, so I will be basically doing this for you.
Generally when things are all explained, it is simple to get feedback on a large change from folks a little distant from the project. Thanks for your patience while I try to champion this for you and the project in general!
@dmvolod great.. one last request before I nag others to look at this. I'll be at wasmio with others, so it will be easy to get people to look. Can you add a README to your example, reviewing what it is doing, and how to run this (apart from invoking protoc?). I'm assuming you won't be at wasmio to showcase this yourself, so I will be basically doing this for you.
Thanks a lot, @codefromthecrypt for taking care my contribution. I would nice to attend an event like a wasmio , but I'm not sure that it will ever be possible
Generally when things are all explained, it is simple to get feedback on a large change from folks a little distant from the project. Thanks for your patience while I try to champion this for you and the project in general!
Added a README.md with approach description and simple example
thank you for this! I will in the next couple days pull feedback besides mine one way or another 🔫 :)
ok taking a close look now
@dmvolod wow this looks very practical. After I have feedback from someone I am tagging below, I'll merge this.
@salaboy I know in the future you may be doing more webassembly + k8s integrations. I know you are new to wazero, but actually being somewhat new makes you a good review candidate. Can you try https://github.com/dmvolod/wasm-k8s-host-proxy and let us know what you think about it? This demonstrates how to make composite plugins based on code in this PR.
@mathetake @evacchi @knqyf263 if any of you can take a look at this, it would be well appreciated. @dmvolod spent a very long time getting this together.
Thanks a lot @codefromthecrypt for your review and feedback. It was very appreciated. Also thanks to you, @mathetake , @evacchi and other wazero contributors for the best of the WebAssembly runtime :tada:
looking fantastic 🏅
Folks this looks amazing.. I would love to try this out against my Kubernetes Cluster, I am still a wasm newbie.. but I will definitely give this a try: https://github.com/dmvolod/wasm-k8s-host-proxy, as creating other extensions for consuming Kubernetes resources is a scenario that I see coming
Folks this looks amazing.. I would love to try this out against my Kubernetes Cluster, I am still a wasm newbie.. but I will definitely give this a try: https://github.com/dmvolod/wasm-k8s-host-proxy, as creating other extensions for consuming Kubernetes resources is a scenario that I see coming
Thanks for feedback, @salaboy Please note, that some adoptions k8s-objects on the which is in progress should be implemented
Awesome! Thanks for your great contribution.
tagged as v0.7.0 enjoy the fun!
@dmvolod once you polish up https://github.com/dmvolod/wasm-k8s-host-proxy I'll re-write the release notes to highlight the work you've done. It would have to be by tomorrow as I'm out on vacation after.
Yes, sure, @codefromthecrypt I will try to fix it, as Kubewarden
team released k8s-objects
with first interface implementation having Get functions made easy and useful.
Branch with k8s-objects-v1.24.0-kw7-unreleased already in place, just need to switch from my forks to released versions (both for go-plugin and k8s-objects).
Thanks again for your help and care :+1:
Issue #, if available:
Description of changes: This PR makes it possible to generate a plugin consisting only of host functions that can be built into other plugins. Allows to create and distribute resusable SDK/library solutions that are compatible with this plugin.
The following changes have been made
wasm-module
name ("env" by default if not specified")Instantiate
function for host functionsMotivation The wazero library allows you to create host functions and libraries based on them in golang, which can be used in any golang application. However, in some cases, the code that is generated by this plugin must be the source for other plugins, i.e. represent some standard interfaces that need to be implemented and a strict set of specific functions that can or should be used to access the host system. For example, it can be a plugin that is an extension of the Kubernetes operator functionality that implements some small peace of logic. This plugin already has a simple description and generation of host functions with the described interaction interface in the form of gRPC. Eventually, it will be possible to write wrapper functions to easily interact with host functions and package them as a library or SDK.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.