solo-io / wasm

Web Assembly tools and SDKs for extending cloud-native infrastructure
Apache License 2.0
305 stars 39 forks source link

Wasm support istio 1.8.1 is not perfect #245

Closed tanjunchen closed 3 years ago

tanjunchen commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

The istio cluster (including the revision field) deployed by istio-operator is not supported by wasm. By default, wasm.io reads the name of the deployment istiod, as seen in the code in https://github.com/solo-io/wasm/blob/master/tools/wasme/cli/pkg/deploy/istio/get_istio_version.go#L30 .

the yaml of deploy istio cluster is

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: example-istiocontrolplane-1-8-1
spec:
  revision: 1-8-1
  profile: demo

To Reproduce Steps to reproduce the behavior:

  1. install k8s cluster
  2. install istio cluster with above yaml
  3. test the example of wasm according to https://docs.solo.io/web-assembly-hub/latest/tutorial_code/deploy_tutorials/deploying_with_istio/

Expected behavior A clear and concise description of what you expected to happen.

Provide support parameter revision for reading the deployment name of istiod.

Additional context Add any other context about the problem here, e.g.

Sodman commented 3 years ago

Hi @tanjunchen, this would be a good feature to implement! Right now we default to using istiod as you've noted, but I could see this being implemented as an additional optional arg --istio-deployment added to the existing wasme deploy istio command.

I see you've found the relevant lines of code, would you be interested in creating a PR to add this enhancement? I