snowdrop / istio-java-api

A Java API to generate Istio descriptors, inspired by Fabric8's kubernetes-model.
Apache License 2.0
112 stars 33 forks source link

Error parsing VirtualService object #77

Closed vtiwari227 closed 4 years ago

vtiwari227 commented 4 years ago

@metacosm Hi, I have a valid Yaml file for VirtualService, which I translate to VirtualService object and send that virtual service object as Json to decorator controller, I see serialized VirtualService object have additional attribute of matchtype and that's been rejected by Istio pilot validation

logs from Metacontroller E0819 16:51:18.506464 1 controller.go:245] failed to sync c4-service-controller "apps/v1:Deployment:r1-utility:service-test-basic": can't reconcile children for Deployment r1-utility/service-test-basic: admission webhook "pilot.valida ││ tion.istio.io" denied the request: error decoding configuration: YAML decoding error: gateways: │ │ - ilb-gateway-internal ││ hosts: ││ - ilb-gateway-. │ │ http: ││ - match: ││ - gateways: [] │ │ headers: ││ x-instanceid: ││ matchType: │ │ exact: "11343434" ││ x-serviceid: ││ matchType: │ │ exact: "123" ││ removeResponseHeaders: [] ││ retries:

Ideally this should not include match type object for http match. Any suggestion will be helpful

metacosm commented 4 years ago

I will take a look ASAP.

metacosm commented 4 years ago

@vtiwari227 First, sorry it took so long for me to get back to this… 😢 Could you provide more details on how you generate the VirtualService and how you process it? An example project with which I could reproduce the issue would be best… Thanks in advance!

metacosm commented 4 years ago

@vtiwari227 Can I close this issue?

vtiwari227 commented 4 years ago

@metacosm yes you can close this. this is no longer a issue