gateway api v1.6.2 experimental

HTTPRoute.spec.rules[].matches[]

HTTPRouteMatch defines the predicate used to match requests to a given action. Multiple match types are ANDed together, i.e. the match will evaluate to true only if all conditions are satisfied. For example, the match below will match a HTTP request only if its path starts with `/foo` AND it contains the `version: v1` header: ``` match: path: value: "/foo" headers: - name: "version" value "v1" ```

4 fields
HTTPRoute.spec.rules[].matches[] fields and descriptions
Field / TypeDescription
object[]

Headers specifies HTTP request header matchers. Multiple match values are ANDed together, meaning, a request must match all the specified headers to select the route.

  • maxItems: 16
  • x-kubernetes-list-map-keys: ["name"]
  • x-kubernetes-list-type: "map"
method
string

Method specifies HTTP method matcher. When specified, this route will be matched only if the request has the specified method. Support: Extended

  • enum: ["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]
object

Path specifies a HTTP request path matcher. If this field is not specified, a default prefix match on the "/" path is provided.

  • default: {"type":"PathPrefix","value":"/"}
  • x-kubernetes-validations: [{"message":"value must be an absolute path and start with '/' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? self.value.startsWith('/') : true"},{"message":"must not contain '//' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.contains('//') : true"},{"message":"must not contain '/./' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.contains('/./') : true"},{"message":"must not contain '/../' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.contains('/../') : true"},{"message":"must not contain '%2f' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.contains('%2f') : true"},{"message":"must not contain '%2F' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.contains('%2F') : true"},{"message":"must not contain '#' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.contains('#') : true"},{"message":"must not end with '/..' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.endsWith('/..') : true"},{"message":"must not end with '/.' when type one of ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? !self.value.endsWith('/.') : true"},{"message":"type must be one of ['Exact', 'PathPrefix', 'RegularExpression']","rule":"self.type in ['Exact','PathPrefix'] || self.type == 'RegularExpression'"},{"message":"must only contain valid characters (matching ^(?:[-A-Za-z0-9/._~!$\u0026'()*+,;=:@]|[%][0-9a-fA-F]{2})+$) for types ['Exact', 'PathPrefix']","rule":"(self.type in ['Exact','PathPrefix']) ? self.value.matches(r\"\"\"^(?:[-A-Za-z0-9/._~!$\u0026'()*+,;=:@]|[%][0-9a-fA-F]{2})+$\"\"\") : true"}]
object[]

QueryParams specifies HTTP query parameter matchers. Multiple match values are ANDed together, meaning, a request must match all the specified query parameters to select the route. Support: Extended

  • maxItems: 16
  • x-kubernetes-list-map-keys: ["name"]
  • x-kubernetes-list-type: "map"