SockShop on Istio

Hi,
I got sockshop
https://microservices-demo.github.io/
working with Istio 1.4.0 but the Virtual Service def seems verbose. Is there a simpler approach?
Tnx

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: mysockshop-gateway
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: frontend-vs
spec:
  hosts:
  - "*"
  gateways:
  - mysockshop-gateway
  http:
  - match:
    - uri:
        exact: /
    - uri:
        exact: /cart
    - uri:
        exact: /catalogue
    - uri:
        prefix: /catalogue
    - uri:
        prefix: /css
    - uri:
        prefix: /js
    - uri:
        prefix: /img
    - uri:
        regex: '^.*\.(ico|png|jpg|html)$'
    route:
    - destination:
        host: front-end.mysockshop.svc.cluster.local

Hi, It is pretty cool you got it working! Do you plan to share your journey/code?

Your VS looks okay to me.

Lin

Hi Linsun,

Oh cool
really I should have given up simplification earlier :slight_smile:
I was just watching http traffic in firefox and making the match rules as things failed

I imagine I could do a really generic regex, root and everything below

This got me distracted for a bit

Last update was over a year ago so that should have been my first clue
It just didn’t work on Istio 1.4.0

Thanks for the verification
Doug