Skip to content

Support for urlRewrite filter in HTTPRoute. #679

Open
@ghostx31

Description

@ghostx31

Hello,
I am currently trying to do a POC on EKS for Gateway API.

I found out there is no filter for urlRewrite in the EKS implementation of the Gateway API.

Here's the HTTPRoute I am using:

kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
  name: podinfo-http-route
  namespace: podinfo
spec:
  parentRefs:
  - kind: Gateway
    name: pegasus-cluster-gateway
    namespace: pegasus-cluster-gateway
    sectionName: http
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: "/podinfo/"
    backendRefs:
    - name: podinfo-svc
      namespace: podinfo
      weight: 1
      port: 9898
    filters:
    - type: URLRewrite
      urlRewrite:
        path:
          type: ReplacePrefixMatch
          replacePrefixMatch: /

This gives the following error: Error from server (BadRequest): error when creating "STDIN": HTTPRoute in version "v1beta1" cannot be handled as a HTTPRoute: strict decoding error: unknown field "spec.rules[0].filters[0].urlRewrite" but I do not encounter this error on GCP's implementation of the Gateway API.

The Gateway controller has been deployed via kubectl and we are running the version: v1.0.7 on EKS 1.29.

Let me know in case any more information is required.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions