sigs.k8s.io/gateway-api@v1.0.0/conformance/tests/httproute-query-param-matching.yaml (about) 1 apiVersion: gateway.networking.k8s.io/v1 2 kind: HTTPRoute 3 metadata: 4 name: query-param-matching 5 namespace: gateway-conformance-infra 6 spec: 7 parentRefs: 8 - name: same-namespace 9 rules: 10 - matches: 11 - queryParams: 12 - name: animal 13 value: whale 14 backendRefs: 15 - name: infra-backend-v1 16 port: 8080 17 - matches: 18 - queryParams: 19 - name: animal 20 value: dolphin 21 backendRefs: 22 - name: infra-backend-v2 23 port: 8080 24 - matches: 25 - queryParams: 26 - name: animal 27 value: dolphin 28 - name: color 29 value: blue 30 - queryParams: 31 - name: ANIMAL 32 value: Whale 33 backendRefs: 34 - name: infra-backend-v3 35 port: 8080 36 37 # Combinations with core match types. 38 - matches: 39 - path: 40 type: PathPrefix 41 value: /path1 42 queryParams: 43 - name: animal 44 value: whale 45 backendRefs: 46 - name: infra-backend-v1 47 port: 8080 48 - matches: 49 - headers: 50 - name: version 51 value: one 52 queryParams: 53 - name: animal 54 value: whale 55 backendRefs: 56 - name: infra-backend-v2 57 port: 8080 58 - matches: 59 - path: 60 type: PathPrefix 61 value: /path2 62 headers: 63 - name: version 64 value: two 65 queryParams: 66 - name: animal 67 value: whale 68 backendRefs: 69 - name: infra-backend-v3 70 port: 8080 71 72 # Match of the form (cond1 AND cond2) OR (cond3 AND cond4 AND cond5) 73 - matches: 74 - path: 75 type: PathPrefix 76 value: /path3 77 queryParams: 78 - name: animal 79 value: shark 80 - path: 81 type: PathPrefix 82 value: /path4 83 headers: 84 - name: version 85 value: three 86 queryParams: 87 - name: animal 88 value: kraken 89 backendRefs: 90 - name: infra-backend-v1 91 port: 8080 92 93 # Matches for checking precedence. 94 - matches: 95 - path: 96 type: PathPrefix 97 value: /path5 98 backendRefs: 99 - name: infra-backend-v1 100 port: 8080 101 - matches: 102 - queryParams: 103 - name: animal 104 value: hydra 105 backendRefs: 106 - name: infra-backend-v2 107 port: 8080 108 - matches: 109 - headers: 110 - name: version 111 value: four 112 backendRefs: 113 - name: infra-backend-v3 114 port: 8080