Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit c815053

Browse files
committed
update proxy_abi_version to support istio/proxyv2
Signed-off-by: mathetake <[email protected]>
1 parent 6c3b074 commit c815053

File tree

16 files changed

+40
-59
lines changed

16 files changed

+40
-59
lines changed

.github/workflows/workflow.yaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
with:
1515
args: make lint
1616

17-
- name: set up go 1.14
17+
- name: set up go 1.15
1818
uses: actions/setup-go@v1
1919
with:
20-
go-version: 1.14
20+
go-version: 1.15
2121

2222
- name: run tests
2323
run: make test.sdk
@@ -26,15 +26,15 @@ jobs:
2626
name: build examples
2727
runs-on: ubuntu-latest
2828
container:
29-
image: tinygo/tinygo:0.14.0
29+
image: tinygo/tinygo:0.15.0
3030
steps:
3131
- name: checkout
3232
uses: actions/checkout@v2
3333

34-
- name: set up go 1.14
34+
- name: set up go 1.15
3535
uses: actions/setup-go@v1
3636
with:
37-
go-version: 1.14
37+
go-version: 1.15
3838

3939
- name: build examples
4040
run: find ./examples -type f -name "main.go" | xargs -Ip tinygo build -o p.wasm -target=wasm -wasm-abi=generic p
@@ -49,11 +49,8 @@ jobs:
4949
name: e2e tests on examples
5050
needs: build-examples
5151
runs-on: ubuntu-latest
52-
services:
53-
httpbin:
54-
image: kennethreitz/httpbin
55-
ports:
56-
- 8000:80
52+
container:
53+
image: mathetake/proxy-wasm-go-ci:istio-1.7.2
5754
steps:
5855
- name: checkout
5956
uses: actions/checkout@v2
@@ -64,16 +61,5 @@ jobs:
6461
name: wasm-binaries
6562
path: examples
6663

67-
- name: set up go 1.14
68-
uses: actions/setup-go@v1
69-
with:
70-
go-version: 1.14
71-
72-
- name: download getenvoy
73-
run: curl -L https://getenvoy.io/cli | sudo bash -s -- -b /usr/local/bin
74-
75-
- name: download envoy
76-
run: getenvoy fetch wasm:1.15
77-
7864
- name: run e2e test
7965
run: go test ./e2e/... -v

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ test:
1717
go test -tags=proxytest $(go list ./... | grep -v e2e | sed 's/github.com\/tetratelabs\/proxy-wasm-go-sdk/./g')
1818

1919
test.e2e:
20-
docker-compose -f ./examples/docker-compose.yaml -d
21-
go test ./e2e
20+
docker run -it -w /tmp/proxy-wasm-go -v $(shell pwd):/tmp/proxy-wasm-go mathetake/proxy-wasm-go-ci:istio-1.7.2 go test ./e2e
2221

2322
run:
24-
getenvoy run wasm:1.15 -- -c ./examples/${name}/envoy.yaml --concurrency 2
23+
docker run --entrypoint='/usr/local/bin/envoy' \
24+
-p 18000:18000 -p 8099:8099 \
25+
-w /tmp/envoy -v $(shell pwd):/tmp/envoy istio/proxyv2:1.7.2 \
26+
-c /tmp/envoy/examples/${name}/envoy.yaml --concurrency 2

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,18 @@ func (ctx *context) OnHttpRequestHeaders(int, bool) types.Action {
3636
```
3737

3838

39-
## requirements
39+
### requirements
4040

41-
- TinyGo(0.14.0+): https://tinygo.org/
42-
- GetEnvoy: https://www.getenvoy.io/install/ (for running examples)
41+
- TinyGo(0.15.0+): https://tinygo.org
42+
43+
### compatible Envoy builds
44+
45+
| proxy-wasm-go-sdk| proxy-wasm ABI version | envoyproxy/envoy-wasm| istio/proxyv2|
46+
|:-------------:|:-------------:|:-------------:|:-------------:|
47+
| master | 0.2.0| N/A | v1.17.2 |
48+
| v0.0.2 | 0.1.0|release/v1.15 | N/A |
4349

44-
To download compatible envoyproxy, run
45-
```bash
46-
getenvoy fetch wasm:1.15
47-
```
4850

49-
The target Envoy version is `release/v1.15`
50-
branch on [envoyproxy/envoy-wasm](https://github.com/envoyproxy/envoy-wasm/tree/release/v1.15).
51-
52-
5351
## setup
5452

5553
- __git clone__ this repository to `${GOPATH}/github.com/tetratelabs/proxy-wasm-go-sdk`

e2e/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM istio/proxyv2:1.7.2
2+
3+
FROM golang:1.15
4+
5+
COPY --from=0 /usr/local/bin/envoy /usr/local/bin/

e2e/e2e_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,12 @@ func TestMain(m *testing.M) {
3838
}
3939

4040
const (
41-
envoyVersion = "wasm:1.15"
4241
envoyEndpoint = "http://localhost:18000"
4342
envoyAdminEndpoint = "http://localhost:8001"
4443
)
4544

4645
func startExample(t *testing.T, name string) (*exec.Cmd, *bytes.Buffer) {
47-
cmd := exec.Command("getenvoy",
48-
"run",
49-
envoyVersion,
50-
"--",
46+
cmd := exec.Command("envoy",
5147
"--concurrency", "2",
5248
"-c", fmt.Sprintf("./examples/%s/envoy.yaml", name))
5349

examples/docker-compose.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/helloworld/envoy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ static_resources:
33
- name: main
44
address:
55
socket_address:
6-
address: 127.0.0.1
6+
address: 0.0.0.0
77
port_value: 18000
88
filter_chains:
99
- filters:

examples/http_auth_random/envoy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ static_resources:
33
- name: main
44
address:
55
socket_address:
6-
address: 127.0.0.1
6+
address: 0.0.0.0
77
port_value: 18000
88
filter_chains:
99
- filters:
@@ -50,8 +50,8 @@ static_resources:
5050
- endpoint:
5151
address:
5252
socket_address:
53-
address: localhost
54-
port_value: 8000
53+
address: httpbin.org
54+
port_value: 80
5555

5656
admin:
5757
access_log_path: "/dev/null"

examples/http_headers/envoy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ static_resources:
33
- name: main
44
address:
55
socket_address:
6-
address: 127.0.0.1
6+
address: 0.0.0.0
77
port_value: 18000
88
filter_chains:
99
- filters:

examples/metrics/envoy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ static_resources:
33
- name: main
44
address:
55
socket_address:
6-
address: 127.0.0.1
6+
address: 0.0.0.0
77
port_value: 18000
88
filter_chains:
99
- filters:

0 commit comments

Comments
 (0)