apiVersion: traffic.tsb.tetrate.io/v2
kind: ServiceRoute
metadata:
  name: helloworld-service-route
  group: helloworld-trf
  workspace: helloworld-ws
  tenant: tetrate
  organization: tetrate
spec:
  service: helloworld/helloworld.helloworld.svc.cluster.local
  portLevelSettings:
    - port: 5000
      trafficType: HTTP
  subsets:
    - name: v1
      labels:
        version: v1
      weight: 50
    - name: v2
      labels:
        version: v2
      weight: 50
  httpRoutes:
    - name: http-route-match-header-and-port
      match:
        - name: match-header-and-port
          headers:
            end-user:
              exact: jason
          port: 5000
      destination:
        - subset: v1
          weight: 80
          port: 5000
        - subset: v2
          weight: 20
          port: 5000
    - name: http-route-match-port
      match:
        - name: match-port
          port: 5000
      destination:
        - subset: v1
          weight: 100
          port: 5000
