Skip to content

matches in HTTPRouteRule should allow more than 8 entries #1485

@Amila-Rukshan

Description

@Amila-Rukshan

What would you like to be added:

When defining more than 8 HTTPRouteMatch for the matches field in HTTPRouteRule, it returns the following error message. We would like to have the support for allowing more than 8 items for a match.

The HTTPRoute "petstore" is invalid: spec.rules[0].matches: Too many: 11: must have at most 8 items

Why this is needed:

It is possible to have more than 8 matches goes to the same backend service and they should be defined under a single HTTPRouteRule. Consider the example given below:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: demo-petstore
  labels:
    version: 1.0.1
spec:
  parentRefs:
  - name: eg
  hostnames:
  - www.example.com
  rules:
  - matches:
    - path:
        type: Exact
        value: /api/v3/pet/{petId}/uploadImage
      method: POST
    - path:
        type: Exact
        value: /api/v3/pet
      method: POST
    - path:
        type: Exact
        value: /api/v3/pet
      method: PUT   
    - path:
        type: Exact
        value: /api/v3/pet/findByStatus
      method: GET
    - path:
        type: Exact
        value: /api/v3/pet/findByTags
      method: GET
    - path:
        type: Exact
        value: /api/v3/pet/{petId}
      method: GET
    - path:
        type: Exact
        value: /api/v3/pet/{petId}
      method: POST
    - path:
        type: Exact
        value: /api/v3/pet/{petId}
      method: DELETE
    - path:
        type: Exact
        value: /api/v3/store/order
      method: POST
    - path:
        type: Exact
        value: /api/v3/store/order/{orderId}
      method: GET
    - path:
        type: Exact
        value: /api/v3/store/order/{orderId}
      method: DELETE
    - path:
        type: Exact
        value: /api/v3/store/inventory
      method: GET
    - path:
        type: Exact
        value: /api/v3/user/createWithArray
      method: POST
    - path:
        type: Exact
        value: /api/v3/user/createWithList
      method: POST
    - path:
        type: Exact
        value: /api/v3/user/{username}
      method: PUT
    backendRefs:
        - name: foo-svc
          port: 8080

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.triage/needs-informationIndicates an issue needs more information in order to work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions