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

Update Envoy image used by deploy envoy to latest #213

Open
Sodman opened this issue Oct 28, 2020 · 4 comments
Open

Update Envoy image used by deploy envoy to latest #213

Sodman opened this issue Oct 28, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@Sodman
Copy link
Member

Sodman commented Oct 28, 2020

Is your feature request related to a problem? Please describe.
Currently the wasme deploy envoy command uses a pretty old version of envoy. Specifically, it uses an old Istio fork of Envoy-wasm based on Envoy 1.15.x with wasm compatability.

Describe the solution you'd like
Now that wasm compatability has been merged into upstream envoy, we should be able to use that vanilla envoy for our local wasme deploy envoy when users are trying to test their filters locally.

Additional context
The default image is stored here, we will also likely need to update docs and tests.

@linsun
Copy link

linsun commented Apr 7, 2021

As part of the work, we should also print out what default image is used if user chooses to use the default image. I'm not seeing any output in the log that indicates the version atm.

@Sodman
Copy link
Member Author

Sodman commented Apr 7, 2021

That's strange, I'm seeing the version when I run it:

$ wasme deploy envoy webassemblyhub.io/sodman/as-istio-1-7-1:v0.1
INFO[0000] mounting filter file at /Users/sod/.wasme/store/acd18953743c0e5175ecb77b2042d0e5/filter.wasm 
INFO[0000] running envoy-in-docker                       container_name=add_header envoy_image="docker.io/istio/proxyv2:1.5.1" filter_image="webassemblyhub.io/sodman/as-istio-1-7-1:v0.1"
Unable to find image 'istio/proxyv2:1.5.1' locally
1.5.1: Pulling from istio/proxyv2
423ae2b273f4: Pull complete 
de83a2304fa1: Pull complete 
f9a83bce3af0: Pull complete 
b6b53be908de: Pull complete 
ca9662f1d1b3: Pull complete 
d21d36c03835: Pull complete 
55a7384a4970: Pull complete 
7c05c5890061: Pull complete 
de6331cfb657: Pull complete 
ce4e6f7dd3f0: Pull complete 
bccc4858b9c8: Pull complete 
e5648cdb3891: Pull complete 
af42eac64ce3: Pull complete 
d50d103111ab: Pull complete 
5dc0c1fd4faf: Pull complete 
8f1d7c2f714d: Pull complete 
73875d1633e3: Pull complete 
Digest: sha256:3ad9ee2b43b299e5e6d97aaea5ed47dbf3da9293733607d9b52f358313e852ae
Status: Downloaded newer image for istio/proxyv2:1.5.1
...

Are you seeing a different output?

The default image is also currently printed in the help text:

$ wasme deploy envoy --help

This command runs Envoy locally in docker using a static bootstrap configuration which includes 
the specified WASM filter image. 

The bootstrap can be generated from an internal default or a modified config provided by the user with --bootstrap.

The generated bootstrap config can be output to a file with --out. If using this option, Envoy will not be started locally.

Usage:
  wasme deploy envoy <image> [--config=<filter config>] [--bootstrap=<custom envoy bootstrap file>] [--envoy-image=<custom envoy image>] [flags]

Flags:
  -b, --bootstrap wasme deploy envoy   Path to an Envoy bootstrap config. If set, wasme deploy envoy will run Envoy locally using the provided configuration file. Set -in=- to use stdin. If empty, will use a default configuration template with a single route to `jsonplaceholder.typicode.com`.
      --docker-run-args docker run     Set to provide additional args to the docker run command used to launch Envoy. Ignored if --out is set.
  -e, --envoy-image string             Name of the Docker image containing the Envoy binary (default "docker.io/istio/proxyv2:1.5.1")
      --envoy-run-args envoy           Set to provide additional args to the envoy command used to launch Envoy. Ignored if --out is set.
  -h, --help                           help for envoy
      --out string                     If set, write the modified Envoy configuration to this file instead of launching Envoy. Set -out=- to use stdout.
      --store string                   Set the path to the local storage directory for wasm images. Defaults to $HOME/.wasme/store

Global Flags:
      --config string    optional config that will be passed to the filter. accepts an inline string.
      --id string        unique id for naming the deployed filter. this is used for logging as well as removing the filter. when running wasme deploy istio, this name must be a valid Kubernetes resource name.
      --root-id string   optional root ID used to bind the filter at the Envoy level. this value is normally read from the filter image directly.
  -v, --verbose          verbose output

@linsun
Copy link

linsun commented Apr 8, 2021

You are right @Sodman - sorry I missed it somehow, could be because the huge spaces we have:

~/Downloads/smc-demo  wasme deploy envoy webassemblyhub.io/linsununc/add-header:v0.1  23:14:33
INFO[0000] mounting filter file at /Users/linsun/.wasme/store/8360b0c39d85d897bd58bfa40ffe8a66/filter.wasm
INFO[0000] running envoy-in-docker container_name=add_header_root_id envoy_image="docker.io/istio/proxyv2:1.5.1" filter_image="webassemblyhub.io/linsununc/add-header:v0.1"

@jmunozro
Copy link
Member

Tinygo add-header template is failing for old and new versions of envoy:

  • OLD VERSION, FAIL: wasme deploy envoy webassemblyhub.io/jmunozro/add-header:v0.1
  • NEW VERSION FAIL: wasme deploy envoy webassemblyhub.io/jmunozro/add-header:v0.1 --envoy-image docker.io/istio/proxyv2:1.9.1
  • SOMETHING IN BETWEEN, OK: wasme deploy envoy webassemblyhub.io/jmunozro/add-header:v0.1 --envoy-image docker.io/istio/proxyv2:1.8.6

However, the filter is accepted by gloo 1.8.0, and working, but it shows a lot of errors in the gateway pod:

$ wasme deploy gloo webassemblyhub.io/jmunozro/add-header:v0.1 --id add-header
INFO[0003] appending wasm filter                         filterID=add-header
INFO[0004] updated gateway                               gateway=gloo-system.gateway-proxy
INFO[0004] appending wasm filter                         filterID=add-header
INFO[0004] updated gateway                               gateway=gloo-system.gateway-proxy-ssl
$ kubectl logs deploy/gateway-proxy -n gloo-system
[2021-08-11 16:51:03.535][8][warning][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:354] createWasm: failed to load (cached) from http://gloo/images/750d63889653e7117fcbc0831f10f0e1d3f7ec0c82fe5787b71d08a783e3393f
[2021-08-11 16:51:03.535][8][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][20][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][20][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][19][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][19][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][19][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][8][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.535][20][critical][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:473] Plugin configured to fail closed failed to load
[2021-08-11 16:51:03.536][8][warning][config] [external/envoy/source/common/config/grpc_subscription_impl.cc:126] gRPC config for type.googleapis.com/envoy.config.listener.v3.Listener rejected: Error adding/updating listener(s)
listener-::-8443: Unable to create Wasm HTTP filter add-header
listener-::-8080: Unable to create Wasm HTTP filter add-header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants