istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/config/kube/gateway/testdata/benchmark-httproute.yaml (about) 1 # the same as pilot/pkg/config/kube/gateway/testdata/route-precedence.yaml 2 apiVersion: gateway.networking.k8s.io/v1beta1 3 kind: GatewayClass 4 metadata: 5 name: istio 6 spec: 7 controllerName: istio.io/gateway-controller 8 --- 9 apiVersion: gateway.networking.k8s.io/v1beta1 10 kind: Gateway 11 metadata: 12 name: gateway 13 namespace: istio-system 14 spec: 15 addresses: 16 - value: istio-ingressgateway 17 type: Hostname 18 gatewayClassName: istio 19 listeners: 20 - name: default 21 hostname: "*.domain.example" 22 port: 80 23 protocol: HTTP 24 allowedRoutes: 25 namespaces: 26 from: Selector 27 selector: 28 matchLabels: 29 istio.io/test-name-part: allowed 30 --- 31 apiVersion: gateway.networking.k8s.io/v1beta1 32 kind: HTTPRoute 33 metadata: 34 name: http 35 namespace: allowed-1 36 spec: 37 parentRefs: 38 - name: gateway 39 namespace: istio-system 40 - kind: Mesh 41 name: istio 42 hostnames: ["a.domain.example", "b.domain.example"] 43 rules: 44 - matches: 45 - path: 46 type: PathPrefix 47 value: /foo 48 headers: 49 - name: my-header 50 value: some-value 51 type: Exact 52 backendRefs: 53 - name: svc1 54 port: 80 55 - matches: 56 - path: 57 type: RegularExpression 58 value: /foo((\/).*)? 59 backendRefs: 60 - name: svc2 61 port: 80 62 --- 63 apiVersion: gateway.networking.k8s.io/v1beta1 64 kind: HTTPRoute 65 metadata: 66 name: http 67 namespace: allowed-2 68 spec: 69 parentRefs: 70 - name: gateway 71 namespace: istio-system 72 - kind: Mesh 73 name: istio 74 hostnames: ["a.domain.example"] 75 rules: 76 - matches: 77 - path: 78 type: PathPrefix 79 value: /foo/bar 80 - path: 81 type: PathPrefix 82 value: /bar 83 backendRefs: 84 - name: svc2 85 port: 80 86 - matches: 87 - path: 88 type: Exact 89 value: /baz 90 headers: 91 - name: my-header 92 value: some-value 93 type: Exact 94 queryParams: 95 - name: my-param 96 value: some-value 97 type: RegularExpression 98 backendRefs: 99 - name: svc2 100 port: 80 101 - matches: 102 - path: 103 type: PathPrefix 104 value: / 105 backendRefs: 106 - name: svc3 107 port: 80 108 --- 109 apiVersion: gateway.networking.k8s.io/v1beta1 110 kind: HTTPRoute 111 metadata: 112 name: http 113 namespace: default 114 spec: 115 parentRefs: 116 - name: gateway 117 namespace: istio-system 118 hostnames: ["a.domain.example", "b.domain.example"] 119 rules: 120 - matches: 121 - path: 122 type: PathPrefix 123 value: /abc 124 headers: 125 - name: my-header 126 value: some-value 127 type: Exact 128 backendRefs: 129 - name: svc4 130 port: 80 131 ---