Skip to content
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

design: Wasm extension supports OCI image code source #3313

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

zhaohuabing
Copy link
Member

Related: #3304

@zhaohuabing zhaohuabing requested a review from a team as a code owner May 1, 2024 01:46
@zhaohuabing zhaohuabing marked this pull request as draft May 1, 2024 01:46
@zhaohuabing zhaohuabing marked this pull request as ready for review May 1, 2024 01:48
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
@zirain
Copy link
Contributor

zirain commented May 1, 2024

I'm not sure which is a better idea:

  1. extend EG controller support this
  2. introduce an new component.

@guydc
Copy link
Contributor

guydc commented May 1, 2024

Is there potential for a new component to be reused by other envoy control planes (e.g. istio)? If so, it could be beneficial from long-term maintenance perspective...

Can we implement this based on some existing OCI registry cache?

@zhaohuabing
Copy link
Member Author

zhaohuabing commented May 1, 2024

Is there potential for a new component to be reused by other envoy control planes (e.g. istio)? If so, it could be beneficial from long-term maintenance perspective...

To simplify the process, I'd like to create this component as part of EG rather than a standalone binary. This will help us avoid unnecessary dependencies/management(install, upgrade,etc.) overhead.

Can we implement this based on some existing OCI registry cache?

We can use https://github.com/google/go-containerregistry

Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Co-authored-by: Arko Dasgupta <arkodg@users.noreply.github.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
the file content directly to response, and then close the file. There won’t be significant caching involved.
However, we need to balance the memory usage and the efficiency, which could be addressed in implementation.

**Caching Mechanism:** Cached files will be evicted based on LRU(Last recently used)algorithm.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add more clarity here ? is there an existing registry cache we can use ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Istio wasm cache fetches wasm module from OCI registry and HTTP url, and saves them to local files. We can reuse most of this code and add an HTTP server in front.

https://github.com/istio/istio/tree/master/pkg/wasm

Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants