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

Istio 1.6 VirtualService and CORS allowOrigins not recognized #164

Closed
kevinnesta opened this issue Jun 30, 2020 · 2 comments
Closed

Istio 1.6 VirtualService and CORS allowOrigins not recognized #164

kevinnesta opened this issue Jun 30, 2020 · 2 comments
Assignees

Comments

@kevinnesta
Copy link

kevinnesta commented Jun 30, 2020

Hello,

Trying to set CORS policy from Istio 1.6.3 VirtualService and especially 'allowOrigins' field:

...
http:
  - corsPolicy:
      allowCredentials: true
      allowHeaders:
      - content-type
      - request-id
      - authorization
      allowOrigins:
      - exact: http://localhost
      maxAge: 24h
    match:
    - uri:
        prefix: /mobile/
...

it leads the service networking-istio to the following error:

E0630 16:04:21.662064       1 reflector.go:123] runtime/asm_amd64.s:1357: Failed to list *v1alpha3.VirtualService: v1alpha3.VirtualServiceList.Items: []v1alpha3.VirtualService: v1alpha3.VirtualService.v1alpha3.VirtualService.Spec: unmarshalerDecoder: unknown field "allowOrigins" in v1alpha3.CorsPolicy, error found in #10 byte of ...|":100}]}]}},{"apiVer|..., bigger context ...|ter.local","port":{"number":80}},"weight":100}]}]}},{"apiVersion":"networking.istio.io/v1alpha3","ki|...

Then, my Knative service is not ready:

conditions:
  - lastTransitionTime: "2020-06-30T17:48:18Z"
    status: "True"
    type: ConfigurationsReady
  - lastTransitionTime: "2020-06-30T17:48:18Z"
    message: Ingress reconciliation failed
    reason: ReconcileIngressFailed
    status: "False"
    type: Ready
  - lastTransitionTime: "2020-06-30T17:48:18Z"
    message: Ingress reconciliation failed
    reason: ReconcileIngressFailed
    status: "False"
    type: RoutesReady

Can you please give your feedback about that? Is there a workaround for now? Is it plan to update the 1.6.X CorsPolicy support?
Thanks!

Knative version used:

kubectl -n knative-serving get pods --show-labels
NAME                                READY   STATUS    RESTARTS   AGE    LABELS
activator-688c498dcd-dhvxr          2/2     Running   0          20h    app=activator,istio.io/rev=default,pod-template-hash=688c498dcd,role=activator,security.istio.io/tlsMode=istio,service.istio.io/canonical-name=activator,service.istio.io/canonical-revision=latest,serving.knative.dev/release=v0.14.2
autoscaler-577b8f6b6-k7m8c          2/2     Running   0          20h    app=autoscaler,istio.io/rev=default,pod-template-hash=577b8f6b6,security.istio.io/tlsMode=istio,service.istio.io/canonical-name=autoscaler,service.istio.io/canonical-revision=latest,serving.knative.dev/release=v0.14.2
autoscaler-hpa-cf757b76b-ckvgh      2/2     Running   0          20h    app=autoscaler-hpa,istio.io/rev=default,pod-template-hash=cf757b76b,security.istio.io/tlsMode=istio,service.istio.io/canonical-name=autoscaler-hpa,service.istio.io/canonical-revision=latest,serving.knative.dev/release=v0.14.2
controller-75cccc4cd6-tmtdg         2/2     Running   1          20h    app=controller,istio.io/rev=default,pod-template-hash=75cccc4cd6,security.istio.io/tlsMode=istio,service.istio.io/canonical-name=controller,service.istio.io/canonical-revision=latest,serving.knative.dev/release=v0.14.2
istio-webhook-b65488fbc-fjkrx       2/2     Running   0          107m   app=istio-webhook,istio.io/rev=default,pod-template-hash=b65488fbc,role=istio-webhook,security.istio.io/tlsMode=istio,service.istio.io/canonical-name=istio-webhook,service.istio.io/canonical-revision=latest,serving.knative.dev/release=v0.14.1
networking-istio-7d9d688b86-d75dr   1/1     Running   0          107m   app=networking-istio,pod-template-hash=7d9d688b86,serving.knative.dev/release=v0.14.1
webhook-7b476996c8-7mlr4            2/2     Running   1          20h    app=webhook,istio.io/rev=default,pod-template-hash=7b476996c8,role=webhook,security.istio.io/tlsMode=istio,service.istio.io/canonical-name=webhook,service.istio.io/canonical-revision=latest,serving.knative.dev/release=v0.14.2

@tcnghia tcnghia self-assigned this Jul 14, 2020
@tcnghia
Copy link
Contributor

tcnghia commented Jul 14, 2020

Latest v0.15 or 0.16 has #114 which allows unknown fields.

Can you please try that?

@tcnghia
Copy link
Contributor

tcnghia commented Aug 12, 2020

This should be already fixed by #114

@tcnghia tcnghia closed this as completed Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants