istio.io/archive/v1.24/zh/blog/2021/wasm-api-alpha/index.html

128 lines
30 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html><html lang=zh itemscope itemtype=https://schema.org/WebPage><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=theme-color content="#466BB0"><meta name=title content="WebAssembly 插件 Alpha 版可用性公告"><meta name=description content="介绍新的 Wasm 插件 API 以及 Envoy 和 Istio 中基于 Wasm 的插件支持的更新。"><meta name=author content="Daniel Grimm (Red Hat), Pengyuan Bian (Google), Takeshi Yoneda (Tetrate); Translated by Wilson Wu (DaoCloud)"><meta name=keywords content="microservices,services,mesh,wasm,extensibility,WebAssembly"><meta property="og:title" content="WebAssembly 插件 Alpha 版可用性公告"><meta property="og:type" content="website"><meta property="og:description" content="介绍新的 Wasm 插件 API 以及 Envoy 和 Istio 中基于 Wasm 的插件支持的更新。"><meta property="og:url" content="/v1.24/zh/blog/2021/wasm-api-alpha/"><meta property="og:image" content="https://raw.githubusercontent.com/istio/istio.io/master/static/img/istio-social.png"><meta property="og:image:alt" content="The Istio sailboat logo"><meta property="og:image:width" content="4096"><meta property="og:image:height" content="2048"><meta property="og:site_name" content="Istio"><meta name=twitter:card content="summary_large_image"><meta name=twitter:site content="@IstioMesh"><title>Istioldie 1.24 / WebAssembly 插件 Alpha 版可用性公告</title>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5XBWY4YJ1E"></script><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date),gtag("config","G-5XBWY4YJ1E")</script><link rel=alternate type=application/rss+xml title="Istio Blog" href=/v1.24/blog/feed.xml><link rel=alternate type=application/rss+xml title="Istio News" href=/v1.24/news/feed.xml><link rel=alternate type=application/rss+xml title="Istio Blog and News" href=/v1.24/feed.xml><link rel="shortcut icon" href=/v1.24/favicons/favicon.ico><link rel=apple-touch-icon href=/v1.24/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/v1.24/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/v1.24/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/v1.24/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/v1.24/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/v1.24/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/v1.24/favicons/android-96x96.png sizes=96xW96><link rel=icon type=image/png href=/v1.24/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/v1.24/favicons/android-192x192.png sizes=192x192><link rel=icon type=image/svg+xml href=/v1.24/favicons/favicon.svg><link rel=icon type=image/png href=/v1.24/favicons/favicon.png><link rel=mask-icon href=/v1.24/favicons/safari-pinned-tab.svg color=#466BB0><link rel=manifest href=/v1.24/manifest.json><meta name=apple-mobile-web-app-title content="Istio"><meta name=application-name content="Istio"><meta name=msapplication-config content="/browserconfig.xml"><meta name=msapplication-TileColor content="#466BB0"><meta name=theme-color content="#466BB0"><link rel=stylesheet href=/v1.24/css/style.min.38f1afbdf6f8efdb4fe991ff2a53ca1c801b5c4602dea2963da44df7ceaacfb8.css integrity="sha256-OPGvvfb479tP6ZH/KlPKHIAbXEYC3qKWPaRN986qz7g=" crossorigin=anonymous><link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&display=swap"><script src=/v1.24/js/themes_init.min.js></script></head><body class="language-unknown archive-site"><script>const branchName="release-1.24",docTitle="WebAssembly 插件 Alpha 版可用性公告",iconFile="/v1.24//img/icons.svg",buttonCopy="复制到剪切板",buttonPrint="打印",buttonDownload="下载"</script><script src="https://www.google.com/cse/brand?form=search-form" defer></script><script src=/v1.24/js/all.min.js data-manual defer></script><header class=main-navigation><nav class="main-navigation-wrapper container-l"><div class=main-navigation-header><a id=brand href=/v1.24/zh/ aria-label=logotype><span class=logo><svg width="128" height="60" viewBox="0 0 128 60"><path d="M58.434 48.823A.441.441.0 0158.3 48.497V22.583a.444.444.0 01.134-.326.446.446.0 01.327-.134h3.527a.447.447.0 01.325.134.447.447.0 01.134.326v25.914a.443.443.0 01-.134.326.444.444.0 01-.325.134h-3.527a.444.444.0 01-.327-.134z"/><path d="m70.969 48.477a6.556 6.556.0 01-2.818-1.955 4.338 4.338.0 01-1-2.78v-.345a.443.443.0 01.134-.326.444.444.0 01.326-.135h3.374a.444.444.0 01.326.135.445.445.0 01.134.326v.077a2.014 2.014.0 001.054 1.667 4.672 4.672.0 002.664.709 4.446 4.446.0 002.492-.633 1.862 1.862.0 00.958-1.591 1.426 1.426.0 00-.786-1.322 12.7 12.7.0 00-2.549-.939l-1.457-.46a21.526 21.526.0 01-3.3-1.227 6.57 6.57.0 01-2.262-1.783 4.435 4.435.0 01-.92-2.894 5.081 5.081.0 012.109-4.275 8.993 8.993.0 015.558-1.591 10.445 10.445.0 014.1.748 6.3 6.3.0 012.722 2.07 5 5 0 01.958 3.009.441.441.0 01-.134.326.441.441.0 01-.325.134h-3.258a.441.441.0 01-.326-.134.443.443.0 01-.134-.326 1.974 1.974.0 00-.978-1.667 4.647 4.647.0 00-2.665-.671 4.741 4.741.0 00-2.435.556 1.724 1.724.0 00-.938 1.553 1.512 1.512.0 00.9 1.4 15.875 15.875.0 003.01 1.055l.843.229a27.368 27.368.0 013.412 1.246 6.67 6.67.0 012.338 1.763 4.387 4.387.0 01.958 2.933 4.988 4.988.0 01-2.146 4.275 9.543 9.543.0 01-5.712 1.552 11.626 11.626.0 01-4.227-.709z"/><path d="m97.039 32.837a.443.443.0 01-.326.135h-3.911a.169.169.0 00-.191.192v9.239a2.951 2.951.0 00.632 2.108 2.7 2.7.0 002.013.652h1.15a.444.444.0 01.325.134.441.441.0 01.134.326v2.875a.471.471.0 01-.459.5l-1.994.039a8 8 0 01-4.524-1.035q-1.495-1.035-1.533-3.91V33.166A.17.17.0 0088.164 32.974H85.978A.441.441.0 0185.652 32.839.441.441.0 0185.518 32.513V29.83a.441.441.0 01.134-.326.444.444.0 01.326-.135h2.186a.169.169.0 00.191-.192v-4.485a.438.438.0 01.134-.326.44.44.0 01.325-.134h3.336a.443.443.0 01.325.134.442.442.0 01.135.326v4.485a.169.169.0 00.191.192h3.911a.446.446.0 01.326.135.446.446.0 01.134.326v2.683a.446.446.0 01-.133.324z"/><path d="m101.694 25.917a2.645 2.645.0 01-.767-1.955 2.65 2.65.0 01.767-1.955 2.65 2.65.0 011.955-.767 2.65 2.65.0 011.955.767 2.652 2.652.0 01.767 1.955 2.647 2.647.0 01-.767 1.955 2.646 2.646.0 01-1.955.767 2.645 2.645.0 01-1.955-.767zm-.211 22.906a.441.441.0 01-.134-.326V29.79a.444.444.0 01.134-.326.446.446.0 01.326-.134h3.527a.446.446.0 01.326.134.445.445.0 01.134.326v18.707a.443.443.0 01-.134.326.443.443.0 01-.326.134h-3.527a.443.443.0 01-.326-.134z"/><path d="m114.019 47.734a8.1 8.1.0 01-3.047-4.255 14.439 14.439.0 01-.652-4.37 14.3 14.3.0 01.614-4.371A7.869 7.869.0 01114 30.56a9.072 9.072.0 015.252-1.5 8.543 8.543.0 015.041 1.5 7.985 7.985.0 013.009 4.14 12.439 12.439.0 01.69 4.37 13.793 13.793.0 01-.651 4.37 8.255 8.255.0 01-3.028 4.275 8.475 8.475.0 01-5.1 1.553 8.754 8.754.0 01-5.194-1.534zm7.629-3.1a4.536 4.536.0 001.476-2.262 11.335 11.335.0 00.383-3.221 10.618 10.618.0 00-.383-3.22 4.169 4.169.0 00-1.457-2.243 4.066 4.066.0 00-2.531-.785 3.942 3.942.0 00-2.453.785 4.376 4.376.0 00-1.5 2.243 11.839 11.839.0 00-.383 3.22 11.84 11.84.0 00.383 3.221 4.222 4.222.0 001.476 2.262 4.075 4.075.0 002.549.8 3.8 3.8.0 002.44-.809z"/><path d="m15.105 32.057v15.565a.059.059.0 01-.049.059L.069 50.25A.06.06.0 01.005 50.167l14.987-33.47a.06.06.0 01.114.025z"/><path d="m17.631 23.087v24.6a.06.06.0 00.053.059l22.449 2.507a.06.06.0 00.061-.084L17.745.032a.06.06.0 00-.114.024z"/><path d="m39.961 52.548-24.833 7.45a.062.062.0 01-.043.0L.079 52.548a.059.059.0 01.026-.113h39.839a.06.06.0 01.017.113z"/></svg></span>
</a><button id=hamburger class=main-navigation-toggle aria-label="Open navigation">
<svg class="icon menu-hamburger"><use xlink:href="/v1.24/img/icons.svg#menu-hamburger"/></svg>
</button>
<button id=menu-close class=main-navigation-toggle aria-label="Close navigation"><svg class="icon menu-close"><use xlink:href="/v1.24/img/icons.svg#menu-close"/></svg></button></div><div id=header-links class=main-navigation-links-wrapper><ul class=main-navigation-links><li class=main-navigation-links-item><a class="main-navigation-links-link has-dropdown"><span>关于</span><svg class="icon dropdown-arrow"><use xlink:href="/v1.24/img/icons.svg#dropdown-arrow"/></svg></a><ul class=main-navigation-links-dropdown><li class=main-navigation-links-dropdown-item><a href=/v1.24/zh/about/service-mesh class=main-navigation-links-link>服务网格</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.24/zh/about/solutions class=main-navigation-links-link>解决方案</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.24/zh/about/case-studies class=main-navigation-links-link>案例学习</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.24/zh/about/ecosystem class=main-navigation-links-link>生态系统</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.24/zh/about/deployment class=main-navigation-links-link>部署</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.24/zh/about/faq class=main-navigation-links-link>FAQ</a></li></ul></li><li class=main-navigation-links-item><a href=/v1.24/zh/blog/ class=main-navigation-links-link><span>博客</span></a></li><li class=main-navigation-links-item><a href=/v1.24/zh/news/ class=main-navigation-links-link><span>新闻</span></a></li><li class=main-navigation-links-item><a href=/v1.24/zh/get-involved/ class=main-navigation-links-link><span>加入我们</span></a></li><li class=main-navigation-links-item><a href=/v1.24/zh/docs/ class=main-navigation-links-link><span>文档</span></a></li></ul><div class=main-navigation-footer><button id=search-show class=search-show title='搜索 istio.io' aria-label=搜索><svg class="icon magnifier"><use xlink:href="/v1.24/img/icons.svg#magnifier"/></svg></button>
<a href=/v1.24/zh/docs/setup/getting-started class="btn btn--primary" id=try-istio>试用 Istio</a></div></div><form id=search-form class=search name=cse role=search><input type=hidden name=cx value=002184991200833970123:iwwf17ikgf4>
<input type=hidden name=ie value=utf-8>
<input type=hidden name=hl value=zh>
<input type=hidden id=search-page-url value=/zh/search>
<input id=search-textbox class="search-textbox form-control" name=q type=search aria-label='搜索 istio.io' placeholder=搜索>
<button id=search-close title=取消搜索 type=reset aria-label=取消搜索><svg class="icon menu-close"><use xlink:href="/v1.24/img/icons.svg#menu-close"/></svg></button></form></nav></header><div class=banner-container></div><article class=post itemscope itemtype=http://schema.org/BlogPosting><div class=header-content><h1>WebAssembly 插件 Alpha 版可用性公告</h1><p>介绍新的 Wasm 插件 API 以及 Envoy 和 Istio 中基于 Wasm 的插件支持的更新。</p></div><p class=post-author>Dec 16, 2021 <span>| </span>作者 Daniel Grimm - Red Hat, Pengyuan Bian - Google, Takeshi Yoneda - Tetrate; Translated by Wilson Wu - DaoCloud</p><div><p><a href=../wasm-progress/>在 Istio 1.9 中引入了</a>
WebAssemblyWasm模块分发以及 Wasm 扩展生态系统库的实验性支持,
其中包含用于开发扩展程序的规范示例以及相关用例内容。在过去的 9 个月里,
经过 Istio、Envoy 和 Proxy-Wasm 社区共同努力,将 Wasm
可扩展性推进到稳定、可靠且易于使用的程度,我们很高兴地宣布
Istio 1.12 中对 Wasm 可扩展性提供 Alpha 支持!在接下来的内容中,
我们将逐步介绍 1.12 版中针对 Wasm 支持所做的更新。</p><h2 id=new-wasmplugin-api>新的 WasmPlugin API</h2><p>通过 <code>extensions.istio.io</code> 命名空间中的新 <code>WasmPlugin</code> CRD
我们引入了一个用于自定义 Wasm 模块对 Istio 代理功能进行扩展的新顶层 API。
这项出色的工作归功于过去两年 <a href=https://github.com/proxy-wasm>Proxy-Wasm</a>
社区出色的规范和实施基础。从现在开始,您不再需要使用 <code>EnvoyFilter</code>
资源向代理添加自定义 Wasm 模块。取而代之的是使用 <code>WasmPlugin</code> 资源:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: extensions.istio.io/v1alpha1
kind: WasmPlugin
metadata:
name: your-filter
spec:
selector:
matchLabels:
app: server
phase: AUTHN
priority: 10
pluginConfig:
someSetting: true
someOtherSetting: false
youNameIt:
- first
- second
url: docker.io/your-org/your-filter:1.0.0</code></pre><p><code>WasmPlugin</code><code>EnvoyFilter</code> 之间有不少相似的地方,
但也存在一些不同之处,因此,让我们对这些字段逐一进行分析。</p><p>在上面的示例中是将 Wasm 模块部署到与 <code>selector</code> 字段匹配的所有工作负载
(包括网关 Pod —— 这与 <code>EnvoyFilter</code> 的工作原理完全相同。</p><p>接下来的字段是 <code>phase</code>。该字段决定了 Wasm
模块将被注入到代理过滤器链中的哪个位置。我们为其定义了四个不同的阶段:</p><ul><li><code>AUTHN</code>:在所有 Istio 身份验证和授权过滤器之前。</li><li><code>AUTHZ</code>:在 Istio 身份验证过滤器之后以及所有一级授权过滤器之前,
即:应用于 <code>AuthorizationPolicy</code> 资源之前。</li><li><code>STATS</code>:在所有授权过滤器之后,以及 Istio 统计过滤器之前。</li><li><code>UNSPECIFIED_PHASE</code>:让控制平面决定注入的位置。通常位于过滤器链的末端,
也就是在路由之前。这也是该 <code>phase</code> 字段的默认值。</li></ul><p><code>pluginConfig</code> 字段用于 Wasm 插件的具体配置。
在此字段中输入的任何内容都将通过 JSON 格式进行编码并传递到您的过滤器中,
您可以在 Proxy-Wasm SDK 的配置回调中访问它。例如,您可以使用
<a href=https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/blob/fd0be8405db25de0264bdb78fae3a82668c03782/proxy_wasm_api.h#L329-L331>C++ SDK</a>
中的 <code>onConfigure</code><a href=https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/v0.1.4/src/dispatcher.rs#L255>Rust SDK</a>
中的 <code>on_configure</code><a href=https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/v0.15.0/proxywasm/types/context.go#L74>Go SDK</a>
中的 <code>OnPluginStart</code> 回调对这些配置进行检索。</p><p><code>url</code> 字段指定了 Wasm 模块的拉取位置。请注意本示例中的 <code>url</code>
是一个 docker URI。除了通过 HTTP、HTTPS 和本地文件系统
(使用 file://)方式加载 Wasm 模块之外,我们还引入了
OCI 镜像格式作为分发 Wasm 模块的首推机制。</p><p>最后要注意的一件事是,目前 Wasm 插件 API 仅适用于入站 HTTP 过滤器链。
未来将添加对网络过滤器和出站流量的支持。</p><h2 id=wasm-image-specification>Wasm 镜像规范</h2><p>我们相信通过容器来存储、发布和管理代理扩展是一个理想的方式,
因此我们与 Solo.io 合作,在与所有仓库和 CLI
工具链兼容的情况下扩展其现有的 Proxy-Wasm 容器格式。
基于您的流程,现在可以使用现有的容器 CLI 工具(例如 Docker CLI
<a href=https://buildah.io/>buildah</a>)构建代理扩展容器。</p><p>如需了解如何构建 OCI 镜像,请参阅<a href=https://github.com/istio-ecosystem/wasm-extensions/blob/master/doc/how-to-build-oci-images.md>这些说明内容(英文)</a></p><h2 id=image-fetcher-in-istio-agent>Istio 代理中的镜像获取器</h2><p>从 Istio 1.9 开始Istio-agent 提供了一个用于加载 Wasm
二进制文件的可靠解决方案,利用 istio-agent 内的 xDS 代理和 Envoy
的扩展配置发现服务ECDS通过 <code>EnvoyFilter</code> 中的配置获取远程 HTTP 源。
相同的机制也适用于 Istio 1.12 中新的 Wasm API 实现。
您可以放心地使用 HTTP 远程资源,不必为远程资源获取失败时 Envoy
可能会因为错误配置陷入困境而担心。</p><p>此外,在 Istio 1.12 中,该功能也已在 Wasm OCI 镜像实现兼容。
这意味着 Istio-agent 现在可以从任何 OCI 仓库获取 Wasm 镜像,包括
Docker Hub、Google Container RegistryGCR
Amazon Elastic Container RegistryAmazon ECR等。
获取镜像后Istio-agent 会从二进制中提取并缓存 Wasm 文件,
然后将它们插入 Envoy 过滤器链中。</p><figure style=width:75%><div class=wrapper-with-intrinsic-ratio style=padding-bottom:67.90606653620353%><a data-skipendnotes=true href=/v1.24/zh/blog/2021/wasm-api-alpha/istio-agent-architecture.svg title="远程 Wasm 模块获取流程"><img class=element-to-stretch src=/v1.24/zh/blog/2021/wasm-api-alpha/istio-agent-architecture.svg alt="远程 Wasm 模块获取流程"></a></div><figcaption>远程 Wasm 模块获取流程</figcaption></figure><h2 id=improvements-in-envoy-wasm-runtime>Envoy Wasm 运行时的改进</h2><p>在 Envoy 中,通过 V8 引擎对 Wasm 运行时提供支持,自从 Istio 1.5
版开始该功能就已发布,而且在此后版本中已经进行了很多改进。</p><h3 id=wasi-supports>WASI 支持</h3><p>首先,目前已经对一些 WASIWebAssembly 系统接口)系统调用进行了支持。
例如,可以在 Wasm 程序中使用 <code>clock_time_get</code> 系统调用,
因此,就像任何其他原生平台一样,您可以在 Envoy Wasm 扩展中使用
Rust 语言中的 <code>std::time::SystemTime::now()</code> 或 Go 语言中的
<code>time.Now().UnixNano()</code>。另一个例子是 Envoy 现在可以支持 <code>random_get</code> 操作,
因此 Go 语言中可以使用“crypto/rand”包作为加密安全随机数生成器。
另外我们已经看到在 Envoy 中运行的 Wasm 程序读取和写入本地文件的需求,
因此,目前也在基于其对文件系统的支持进行研究。</p><h3 id=debuggability>可调试性</h3><p>接下来是针对可调试性的改进。目前,当 Envoy 运行时遇到错误的时候,
程序将产生堆栈跟踪信息,例如,在 C++ 语言中发生空指针异常,
在 Go 或 Rust 语言中调用函数时发生 Panic。相比之前 Envoy
错误消息缺失相关信息的情况,目前这些信息已经被展示并且可用于程序调试:</p><pre><code class=language-plain data-expandlinks=true data-repo=istio>Function: proxy_on_request_headers failed: Uncaught RuntimeError: unreachable
Proxy-Wasm plugin in-VM backtrace:
0: 0xdbd - runtime._panic
1: 0x103ab - main.anotherCalculation
2: 0x10399 - main.someCalculation
3: 0xea57 - main.myHeaderHandler
4: 0xea15 - proxy_on_request_headers</code></pre><p>上面是基于 Go SDK Wasm 扩展的示例堆栈跟踪信息。
您可能会注意到输出在跟踪信息中的内容不包括任何文件名和行序号。
这也是一个与 WebAssembly 的 DWARF 格式以及 WebAssembly
异常处理规范提案相关的未解决问题,以及未来的重点工作内容。</p><h3 id=strace-support-for-wasm-programs>Wasm 程序对 Strace 的支持</h3><p>您可以看到 Envoy 产生的 <code>strace</code> 等效日志。通过使用 Istio
代理组件的 <code>wasm:trace</code> 日志级别,您可以观察到横跨 Wasm 虚拟机和
Envoy 之间的所有系统调用和 Proxy-Wasm ABI 调用内容。
下面是此类 <code>strace</code> 日志流的示例:</p><pre><code class=language-plain data-expandlinks=true data-repo=istio>[host-&gt;vm] proxy_on_context_create(2, 1)
[host&lt;-vm] proxy_on_context_create return: void
[host-&gt;vm] proxy_on_request_headers(2, 8, 1)
[vm-&gt;host] wasi_snapshot_preview1.random_get(86928, 32)
[vm&lt;-host] wasi_snapshot_preview1.random_get return: 0
[vm-&gt;host] env.proxy_log(2, 87776, 18)</code></pre><p>这对于在运行时调试 Wasm 程序的执行特别有用,比如,验证其是否存在恶意系统调用操作。</p><h3 id=arbitrary-prometheus-namespace-for-in-wasm-metrics>在任意 Prometheus 命名空间中的内置 Wasm 指标</h3><p>最后一项更新是关于指标的。Wasm 扩展已经能够像其他任何指标一样,
定义自己的自定义指标并将其暴露在 Envoy 中,但在 Istio 1.12 之前,
所有这些自定义指标都需要以 <code>envoy_</code> Prometheus 命名空间名称为前缀,
用户无法使用他们自己的命名空间进行命名。而现在,您可以选择所需的任何命名空间,
您的指标将按原样在 Envoy 中暴露,而不会再带有 <code>envoy_</code> 前缀。</p><p>请注意,为了真实的暴露这些自定义指标,您必须在 <code>meshConfig</code> 中使用
<a href=/v1.24/zh/docs/reference/config/istio.mesh.v1alpha1/#ProxyConfig-ProxyStatsMatcher><code>ProxyConfig.proxyStatsMatcher</code></a>
进行全局配置,或使用 <code>proxy.istio.io/config</code> 针对每个代理进行配置。
有关详细信息,请参阅 <a href=/v1.24/zh/docs/ops/configuration/telemetry/envoy-stats/><code>Envoy Statistics</code></a></p><h2 id=future-work-and-looking-for-feedback>后续的工作以及期待反馈</h2><p>尽管我们已经发布了 Wasm 插件的 Alpha 版本,但仍有很多工作要做。
其中一个重要的工作内容是在 Wasm API 中支持“镜像拉取 Secret”
这将允许您轻松使用私有仓库中的 OCI 镜像。其他工作还包括对 L4
过滤器的推荐支持、Wasm 二进制文件的签名验证、Envoy 中的运行时改进、
Proxy-Wasm SDK 改进、文档等内容。</p><p>这只是我们在 Istio 中提供推荐 Wasm 支持计划的开始。
我们很乐意听到您的反馈,用于在 Istio 未来版本中改善 Wasm 插件开发人员的使用体验!</p></div><div class=share-social><div class=heading>Share this post</div><div class=share-buttons><a href="https://www.linkedin.com/shareArticle?mini=true&url=%2fv1.24%2fzh%2fblog%2f2021%2fwasm-api-alpha%2f" target=_blank><img class=share-icon src=/v1.24/img/social/linkedin.svg alt="Share to LinkedIn">
</a><a href="https://twitter.com/intent/tweet?text=WebAssembly%20%e6%8f%92%e4%bb%b6%20Alpha%20%e7%89%88%e5%8f%af%e7%94%a8%e6%80%a7%e5%85%ac%e5%91%8a&url=%2fv1.24%2fzh%2fblog%2f2021%2fwasm-api-alpha%2f" target=_blank><img class=share-icon src=/v1.24/img/social/twitterx.svg alt="Share to X">
</a><a href="https://www.facebook.com/sharer/sharer.php?u=%2fv1.24%2fzh%2fblog%2f2021%2fwasm-api-alpha%2f" target=_blank><img class=share-icon src=/v1.24/img/social/facebook.svg alt="Share to Facebook"></a></div></div><nav class=pagenav><div class=left></div><div class=right><a title="介绍 Istio 对 gRPC 无代理服务网格功能的支持。" href=/v1.24/zh/blog/2021/proxyless-grpc/ class=next-link>基于 gRPC 的无代理服务网格<svg class="icon right-arrow"><use xlink:href="/v1.24/img/icons.svg#right-arrow"/></svg></a></div></nav></article><footer class=footer><div class="footer-wrapper container-l"><div class="user-links footer-links"><a class=channel title='Istio 的代码在 GitHub 上开发' href=https://github.com/istio/community aria-label=GitHub><svg class="icon github"><use xlink:href="/v1.24/img/icons.svg#github"/></svg>
</a><a class=channel title='如果您想深入了解 Istio 的技术细节,请查看我们日益完善的设计文档' href=https://groups.google.com/forum/#!forum/istio-team-drive-access aria-label="team drive"><svg class="icon drive"><use xlink:href="/v1.24/img/icons.svg#drive"/></svg>
</a><a class=channel title='在 Slack 上与 Istio 社区交互讨论开发问题(仅限邀请)' href=https://slack.istio.io aria-label=slack><svg class="icon slack"><use xlink:href="/v1.24/img/icons.svg#slack"/></svg>
</a><a class=channel title='Stack Overflow 中列举了针对实际问题以及部署、配置和使用 Istio 的各项回答' href=https://stackoverflow.com/questions/tagged/istio aria-label="Stack Overflow"><svg class="icon stackoverflow"><use xlink:href="/v1.24/img/icons.svg#stackoverflow"/></svg>
</a><a class=channel title='Follow us on LinkedIn to get the latest news' href=https://www.linkedin.com/company/istio/ aria-label=LinkedIn><svg class="icon linkedin"><use xlink:href="/v1.24/img/icons.svg#linkedin"/></svg>
</a><a class=channel title='关注我们的 Twitter 来获取最新信息' href=https://twitter.com/IstioMesh aria-label=Twitter><svg class="icon twitter"><use xlink:href="/v1.24/img/icons.svg#twitter"/></svg>
</a><a class=channel title='Follow us on Bluesky to get the latest news' href=https://bsky.app/profile/istio.io aria-label=Bluesky><svg class="icon bluesky"><use xlink:href="/v1.24/img/icons.svg#bluesky"/></svg>
</a><a class=channel title='Follow us on Mastodon to get the latest news' href=https://mastodon.social/@istio aria-label=Mastodon rel=me><svg class="icon mastodon"><use xlink:href="/v1.24/img/icons.svg#mastodon"/></svg></a></div><hr class=footer-separator role=separator><div class="info footer-info"><a class=logo href=/v1.24/zh/ aria-label=logotype><svg width="128" height="60" viewBox="0 0 128 60"><path d="M58.434 48.823A.441.441.0 0158.3 48.497V22.583a.444.444.0 01.134-.326.446.446.0 01.327-.134h3.527a.447.447.0 01.325.134.447.447.0 01.134.326v25.914a.443.443.0 01-.134.326.444.444.0 01-.325.134h-3.527a.444.444.0 01-.327-.134z"/><path d="m70.969 48.477a6.556 6.556.0 01-2.818-1.955 4.338 4.338.0 01-1-2.78v-.345a.443.443.0 01.134-.326.444.444.0 01.326-.135h3.374a.444.444.0 01.326.135.445.445.0 01.134.326v.077a2.014 2.014.0 001.054 1.667 4.672 4.672.0 002.664.709 4.446 4.446.0 002.492-.633 1.862 1.862.0 00.958-1.591 1.426 1.426.0 00-.786-1.322 12.7 12.7.0 00-2.549-.939l-1.457-.46a21.526 21.526.0 01-3.3-1.227 6.57 6.57.0 01-2.262-1.783 4.435 4.435.0 01-.92-2.894 5.081 5.081.0 012.109-4.275 8.993 8.993.0 015.558-1.591 10.445 10.445.0 014.1.748 6.3 6.3.0 012.722 2.07 5 5 0 01.958 3.009.441.441.0 01-.134.326.441.441.0 01-.325.134h-3.258a.441.441.0 01-.326-.134.443.443.0 01-.134-.326 1.974 1.974.0 00-.978-1.667 4.647 4.647.0 00-2.665-.671 4.741 4.741.0 00-2.435.556 1.724 1.724.0 00-.938 1.553 1.512 1.512.0 00.9 1.4 15.875 15.875.0 003.01 1.055l.843.229a27.368 27.368.0 013.412 1.246 6.67 6.67.0 012.338 1.763 4.387 4.387.0 01.958 2.933 4.988 4.988.0 01-2.146 4.275 9.543 9.543.0 01-5.712 1.552 11.626 11.626.0 01-4.227-.709z"/><path d="m97.039 32.837a.443.443.0 01-.326.135h-3.911a.169.169.0 00-.191.192v9.239a2.951 2.951.0 00.632 2.108 2.7 2.7.0 002.013.652h1.15a.444.444.0 01.325.134.441.441.0 01.134.326v2.875a.471.471.0 01-.459.5l-1.994.039a8 8 0 01-4.524-1.035q-1.495-1.035-1.533-3.91V33.166A.17.17.0 0088.164 32.974H85.978A.441.441.0 0185.652 32.839.441.441.0 0185.518 32.513V29.83a.441.441.0 01.134-.326.444.444.0 01.326-.135h2.186a.169.169.0 00.191-.192v-4.485a.438.438.0 01.134-.326.44.44.0 01.325-.134h3.336a.443.443.0 01.325.134.442.442.0 01.135.326v4.485a.169.169.0 00.191.192h3.911a.446.446.0 01.326.135.446.446.0 01.134.326v2.683a.446.446.0 01-.133.324z"/><path d="m101.694 25.917a2.645 2.645.0 01-.767-1.955 2.65 2.65.0 01.767-1.955 2.65 2.65.0 011.955-.767 2.65 2.65.0 011.955.767 2.652 2.652.0 01.767 1.955 2.647 2.647.0 01-.767 1.955 2.646 2.646.0 01-1.955.767 2.645 2.645.0 01-1.955-.767zm-.211 22.906a.441.441.0 01-.134-.326V29.79a.444.444.0 01.134-.326.446.446.0 01.326-.134h3.527a.446.446.0 01.326.134.445.445.0 01.134.326v18.707a.443.443.0 01-.134.326.443.443.0 01-.326.134h-3.527a.443.443.0 01-.326-.134z"/><path d="m114.019 47.734a8.1 8.1.0 01-3.047-4.255 14.439 14.439.0 01-.652-4.37 14.3 14.3.0 01.614-4.371A7.869 7.869.0 01114 30.56a9.072 9.072.0 015.252-1.5 8.543 8.543.0 015.041 1.5 7.985 7.985.0 013.009 4.14 12.439 12.439.0 01.69 4.37 13.793 13.793.0 01-.651 4.37 8.255 8.255.0 01-3.028 4.275 8.475 8.475.0 01-5.1 1.553 8.754 8.754.0 01-5.194-1.534zm7.629-3.1a4.536 4.536.0 001.476-2.262 11.335 11.335.0 00.383-3.221 10.618 10.618.0 00-.383-3.22 4.169 4.169.0 00-1.457-2.243 4.066 4.066.0 00-2.531-.785 3.942 3.942.0 00-2.453.785 4.376 4.376.0 00-1.5 2.243 11.839 11.839.0 00-.383 3.22 11.84 11.84.0 00.383 3.221 4.222 4.222.0 001.476 2.262 4.075 4.075.0 002.549.8 3.8 3.8.0 002.44-.809z"/><path d="m15.105 32.057v15.565a.059.059.0 01-.049.059L.069 50.25A.06.06.0 01.005 50.167l14.987-33.47a.06.06.0 01.114.025z"/><path d="m17.631 23.087v24.6a.06.06.0 00.053.059l22.449 2.507a.06.06.0 00.061-.084L17.745.032a.06.06.0 00-.114.024z"/><path d="m39.961 52.548-24.833 7.45a.062.062.0 01-.043.0L.079 52.548a.059.059.0 01.026-.113h39.839a.06.06.0 01.017.113z"/></svg></a><div class=footer-languages><a tabindex=-1 lang=en id=switch-lang-en class=footer-languages-item>English
</a><a tabindex=-1 lang=zh id=switch-lang-zh class="footer-languages-item active"><svg class="icon tick"><use xlink:href="/v1.24/img/icons.svg#tick"/></svg>
中文
</a><a tabindex=-1 lang=uk id=switch-lang-uk class=footer-languages-item>Українська</a></div></div><ul class=footer-policies><li class=footer-policies-item><a class=footer-policies-link href=https://www.linuxfoundation.org/legal/terms>条款
</a>|
<a class=footer-policies-link href=https://www.linuxfoundation.org/legal/privacy-policy>隐私政策
</a>|
<a class=footer-policies-link href=https://www.linuxfoundation.org/legal/trademark-usage>商标
</a>|
<a class=footer-policies-link href=https://github.com/istio/istio.io/edit/release-1.24/content/zh/blog/2021/wasm-api-alpha/index.md>在 GitHub 上编辑此页</a></li></ul><div class=footer-base><span class=footer-base-copyright>&copy; 2024 the Istio Authors.</span>
<span class=footer-base-version>部分内容可能滞后于英文版本,同步工作正在进行中<br>版本
Istio 归档
1.24.3</span><ul class=footer-base-releases><li class=footer-base-releases-item><a tabindex=-1 class=footer-base-releases-link onclick='return navigateToUrlOrRoot("https://istio.io/blog/2021/wasm-api-alpha/"),!1'>当前版本</a></li><li class=footer-base-releases-item><a tabindex=-1 class=footer-base-releases-link onclick='return navigateToUrlOrRoot("https://preliminary.istio.io/blog/2021/wasm-api-alpha/"),!1'>下个版本</a></li><li class=footer-base-releases-item><a tabindex=-1 class=footer-base-releases-link href=https://istio.io/archive>旧版本</a></li></ul></div></div></footer><div id=scroll-to-top-container aria-hidden=true><button id=scroll-to-top title=回到顶部 tabindex=-1><svg class="icon top"><use xlink:href="/v1.24/img/icons.svg#top"/></svg></button></div></body></html>