envoyproxy / gateway

Manages Envoy Proxy as a Standalone or Kubernetes-based Application Gateway
https://gateway.envoyproxy.io
Apache License 2.0
1.63k stars 354 forks source link

HTTPRouteFilter CRD absent in v1.1 installation via kustomize of the Helm Chart #4719

Closed ferdinandosimonetti closed 1 week ago

ferdinandosimonetti commented 1 week ago

Description:

I was trying to perform regex rewrite of path for an HTTPRoute, following Rewrite URL path with regex but when I applied the needed resources, I received

error: resource mapping not found for name: "ms-context-integration-redirect" namespace: "" from "httproute.yml": no matches for kind "HTTPRouteFilter" in version "gateway.envoyproxy.io/v1alpha1" ensure CRDs are installed first

Repro steps:

Below you can find the resources I was trying to deploy

---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: HTTPRouteFilter
metadata:
  name: ms-context-integration-redirect
spec:
  urlRewrite:
    path:
      type: ReplaceRegexMatch
      replaceRegexMatch:
        pattern: '/(benchmark|estimation|predictive)/api/(.*)'
        substitution: '/\1/\2'
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: ms-context-integration-redirect
  namespace: apis-dev
spec:
  parentRefs:
    - name: gateway-private
      namespace: balancers-dev
      sectionName: https
  hostnames:
    - "ms-dev.environment.company.com"
  rules:
    - backendRefs:
        - group: ""
          kind: Service
          name: ms-context-integration-service
          port: 80
      matches:
        - path:
            type: RegularExpression
            value: /(benchmark|estimation|predictive)/api/(.*)
      filters:
        - type: ExtensionRef
          extensionRef:
            group: gateway.envoyproxy.io
            kind: HTTPRouteFilter
            name: ms-context-integration-redirect

In fact, I can't find the corresponding CRD between the ones installed by Envoy Gateway deployment

k get crd|egrep -i 'envoy|gateway|route'
backendlbpolicies.gateway.networking.k8s.io            2024-11-11T10:18:37Z
backends.gateway.envoyproxy.io                         2024-11-11T10:18:37Z
backendtlspolicies.gateway.networking.k8s.io           2024-11-11T10:18:37Z
backendtrafficpolicies.gateway.envoyproxy.io           2024-11-11T10:18:37Z
clienttrafficpolicies.gateway.envoyproxy.io            2024-11-11T10:18:37Z
envoyextensionpolicies.gateway.envoyproxy.io           2024-11-11T10:18:38Z
envoypatchpolicies.gateway.envoyproxy.io               2024-11-11T10:18:38Z
envoyproxies.gateway.envoyproxy.io                     2024-11-11T10:18:39Z
gatewayclasses.gateway.networking.k8s.io               2024-11-11T10:18:39Z
gateways.gateway.networking.k8s.io                     2024-11-11T10:18:39Z
grpcroutes.gateway.networking.k8s.io                   2024-11-11T10:18:40Z
httproutes.gateway.networking.k8s.io                   2024-11-11T10:18:40Z
referencegrants.gateway.networking.k8s.io              2024-11-11T10:18:40Z
securitypolicies.gateway.envoyproxy.io                 2024-11-11T10:18:41Z
tcproutes.gateway.networking.k8s.io                    2024-11-11T10:18:41Z
tlsroutes.gateway.networking.k8s.io                    2024-11-11T10:18:42Z
udproutes.gateway.networking.k8s.io                    2024-11-11T10:18:42Z

Note: If there are privacy concerns, sanitize the data prior to sharing.

Environment:

Envoy Gateway version: v1.1

Logs:

Include the access logs and the Envoy logs.

arkodg commented 1 week ago

this feature was added in v1.2, so you'd need to upgrade to v1.2 to leverage it