Closed drzaeus77 closed 8 months ago
Describe the solution you'd like:
I would like to be able to include a filters section in the route (Gateway API). An example would be something like:
filters
route: main: enabled: true kind: HTTPRoute parentRefs: ... rules: - backendRefs: - name: backend1 port: 3000 - matches: - path: type: PathPrefix value: /api backendRefs: - name: backend2 port: 3001 filters: - type: URLRewrite urlRewrite: path: type: ReplacePrefixMatch replacePrefixMatch: ""
Currently I am doing the above with a separate HTTPRoute object.
Anything else you would like to add:
I believe the following may be a reasonable patch, but don't have enough helm experience to build and test it.
diff --git a/charts/library/common/templates/classes/_route.tpl b/charts/library/common/templates/classes/_route.tpl index 77f9d90..7cb92f0 100644 --- a/charts/library/common/templates/classes/_route.tpl +++ b/charts/library/common/templates/classes/_route.tpl @@ -74,6 +74,10 @@ spec: matches: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 6 }} + {{- end }} {{- end }} {{- end }} {{- end }}
i think i could pick this up and fix GRPC at the same time. https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1alpha2.GRPCRoute GRPC also supports match + filters
Details
Describe the solution you'd like:
I would like to be able to include a
filters
section in the route (Gateway API). An example would be something like:Currently I am doing the above with a separate HTTPRoute object.
Anything else you would like to add:
I believe the following may be a reasonable patch, but don't have enough helm experience to build and test it.