tinygo version
tinygo version 0.27.0 darwin/amd64 (using go version go1.19.3 and LLVM version 15.0.0)
2. 创建 wasm-istio 项目
初始化项目
1
2
3
mkdir wasm-istio
cd wasm-istio
go mod init wasm-istio
编辑 main.go
1
2
3
4
kubectl get wasmplugins.extensions.istio.io
NAME AGE
add-header-hello-world 27s
查看 Istiod 日志
1
2
3
4
5
6
2023-02-22T08:31:10.017446Z info ads Push debounce stable[75] 1 for config WasmPlugin/default/add-header-hello-world: 100.09877ms since last change, 100.098558ms since last push, full=true
2023-02-22T08:31:10.017744Z info ads XDS: Pushing:2023-02-22T08:31:10Z/49 Services:10 ConnectedEndpoints:3 Version:2023-02-22T08:31:10Z/49
2023-02-22T08:31:10.017990Z info ads LDS: PUSH for node:istio-egressgateway-7fcb98978c-ppkdx.istio-system resources:0 size:0B
2023-02-22T08:31:10.018241Z info ads LDS: PUSH for node:istio-ingressgateway-55b6cffcbc-w6lwv.istio-system resources:1 size:3.7kB
2023-02-22T08:31:10.020476Z info ads LDS: PUSH for node:blog-7cc68f9d6b-m9rpd.default resources:20 size:96.8kB
2023-02-22T08:31:10.066004Z info ads ECDS: PUSH request for node:blog-7cc68f9d6b-m9rpd.default resources:1 size:327B