Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Unsupported Value "URLRewrite" in NGINX Gateway Fabric v1.1.0 #1688

Closed
oamm opened this issue Mar 14, 2024 · 2 comments
Closed

Bug: Unsupported Value "URLRewrite" in NGINX Gateway Fabric v1.1.0 #1688

oamm opened this issue Mar 14, 2024 · 2 comments

Comments

@oamm
Copy link

oamm commented Mar 14, 2024

Describe the bug
When using the URLRewrite filter in NGINX Gateway Fabric version 1.1.0, even after configuring it according to the documentation and the commit here, an error occurs: "All rules are invalid: [spec.rules[0].filters[0].type: Unsupported value: "URLRewrite": supported values: "RequestRedirect", "RequestHeaderModifier", spec.rules[1].filters[0].type: Unsupported value: "URLRewrite": supported values: "RequestRedirect", "RequestHeaderModifier"]".

To Reproduce
Steps to reproduce the behavior:

Deploy NGINX Gateway Fabric version 1.1.0 to a Kubernetes Bare Metal cluster.
Configure an HTTPRoute with the URLRewrite filter as described in the provided example route.
Apply the configuration and observe the error.

Expected behavior
The URLRewrite filter should be supported and function as expected without throwing errors.

Your environment

Version of the NGINX Gateway Fabric: 1.1.0
Version of Kubernetes: v1.29.2
Kubernetes platform: Bare Metal
Details on how NGINX Gateway Fabric Pod is exposed: LoadBalancer
Logs of NGINX container:

Additional context


apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: lynx-gateway
  namespace: lynx
spec:
  gatewayClassName: nginx
  listeners:
    - name: http
      port: 80
      protocol: HTTP
      allowedRoutes:
        namespaces:
          from: Same
      hostname: "*.lynx"

---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: http-lynx-api
  namespace: lynx
  labels:
    app: lynx-api
spec:
  parentRefs:
    - name: lynx-gateway
      sectionName: http
  hostnames:
    - api.lynx
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /auth
      filters:
        - type: URLRewrite
          urlRewrite:
            path:
              type: ReplacePrefixMatch
              replacePrefixMatch: /
      backendRefs:
        - name: lynx-authentication
          namespace: lynx
          kind: Service
          port: 80
    - matches:
        - path:
            type: PathPrefix
            value: /catalogs
      filters:
        - type: URLRewrite
          urlRewrite:
            path:
              type: ReplacePrefixMatch
              replacePrefixMatch: /
      backendRefs:
        - name: lynx-catalog-central
          namespace: lynx
          kind: Service
          port: 80
---
@sjberman
Copy link
Collaborator

@oamm URLRewrite is not supported in v1.1.0. It will be released as part of v1.2.0, and is available on the edge version based on the main branch.

@sjberman
Copy link
Collaborator

https://docs.nginx.com/nginx-gateway-fabric/ contains the documentation for the latest supported release version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants