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

wasme deploy fails when serverHeaderTransformation exists in gateway config #257

Open
jameshbarton opened this issue Apr 7, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jameshbarton
Copy link
Contributor

Describe the bug
wasme deploy fails when serverHeaderTransformation already exists in gateway config. For context, see this blog post.

To Reproduce
Steps to reproduce the behavior:

  1. Install httpbin:
    kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml
  2. Add a route to httpbin:
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
  name: httpbin
  namespace: gloo-system
spec:
  virtualHost:
    domains:
    - '*'
    routes:
    - matchers:
      - prefix: /
      routeAction:
        single:
          upstream:
            name: default-httpbin-8000
            namespace: gloo-system
  1. Patch the gateway to add serverHeaderTransformation:
kubectl patch gateway -n gloo-system gateway-proxy --type merge -p '{"spec":{"httpGateway":{"options":{"httpConnectionManagerSettings":{"serverHeaderTransformation":"PASS_THROUGH"}}}}}'
  1. Deploy a WASM filter to the gateway. Observe the unexpected error. Running this without the patched gateway from step 3 works fine.
% wasme deploy gloo webassemblyhub.io/jameshbarton/remove-headers:v1.0 --id=remove-headers --config "x-envoy,server"
Error: All attempts fail:
#1: converting output crd: reading crd spec on resource gateway-proxy in namespace gloo-system into v1Gateway: unknown field "serverHeaderTransformation" in hcm.HttpConnectionManagerSettings

Expected behavior
The wasme deploy succeeds with no errors.

Additional context

% glooctl version
Client: {"version":"1.7.0"}
Server: {"type":"Gateway","enterprise":true,"kubernetes":{"containers":[{"Tag":"1.7.0","Name":"discovery","Registry":"quay.io/solo-io"},{"Tag":"1.7.0","Name":"extauth-ee","Registry":"quay.io/solo-io"},{"Tag":"1.7.0","Name":"gateway","Registry":"quay.io/solo-io"},{"Tag":"1.7.0","Name":"gloo-ee-envoy-wrapper","Registry":"quay.io/solo-io"},{"Tag":"1.7.0","Name":"gloo-ee","Registry":"quay.io/solo-io"},{"Tag":"1.7.0","Name":"observability-ee","Registry":"quay.io/solo-io"},{"Tag":"1.7.0","Name":"rate-limit-ee","Registry":"quay.io/solo-io"},{"Tag":"5","Name":"redis","Registry":"docker.io"}],"namespace":"gloo-system"}}
@jameshbarton jameshbarton added the bug Something isn't working label Apr 7, 2021
@Sodman
Copy link
Member

Sodman commented Apr 7, 2021

We'll need to bump the version of Gloo used to one that includes this field - https://github.com/solo-io/wasm/blob/master/tools/wasme/cli/go.mod#L30 (We are using Gloo 1.5 and I believe this field was added in Gloo 1.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants