spec icon indicating copy to clipboard operation
spec copied to clipboard

Is the reading host env function workable with istio-proxy?

Open linzg2002 opened this issue 4 years ago • 1 comments

@mathetake I am very interested on this reading host env feature. So I just reviewed all issues and PR around this topic. But still not very clear about how to use it in real case. Could you give some tips? Such as how to config it in envoy.yaml and how to write the code in the wasm filter in C++? I actually had tried like this: in istio envoyfilter.yaml

config:
  root_id: my_root_id
  vm_config:
    code:
      local:
        filename: /var/local/lib/wasm-filters/example-filter.wasm
    runtime: envoy.wasm.runtime.v8
    vm_id: "my_vm_id"
    environment_variables: ["HOME"]

in my wasm-filter.cc

    this->theHome = std::getenv("HOME");

Unluckily, I got nothing output. So anywrong I did on this? Bwt, is the function support by istio-envoy? and which should the istio version to be at least? Looking forward for your help, thanks in advance.

linzg2002 avatar Dec 28 '21 11:12 linzg2002

@linzg2002 istio support this with first-class api WasmPlugin in v1.14. https://github.com/istio/istio/pull/37227

zirain avatar Jun 11 '22 07:06 zirain

This is not the issue about the specification. Closing.

mathetake avatar Jun 06 '23 04:06 mathetake