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

Doesn envoy support different path rewrite for each endpoint #34078

Closed
ningyougang opened this issue May 10, 2024 · 2 comments
Closed

Doesn envoy support different path rewrite for each endpoint #34078

ningyougang opened this issue May 10, 2024 · 2 comments
Labels
area/path_rewrite question Questions that are neither investigations, bugs, nor enhancements

Comments

@ningyougang
Copy link

for upstream endpoint, e.g.

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
...
spec:
  configPatches:
  - applyTo: CLUSTER
    match:
      cluster:
        service: backend.target-namespace
      context: GATEWAY
    patch:
      operation: MERGE
      value:
        load_assignment:
          endpoints:
          - lb_endpoints:
            - endpoint:      # endpointA
                address:
                  socket_address:
                    address: xxx.xxx.xxx.xxx
                    port_value: 9999
          - lb_endpoints:
            - endpoint:      # endpointB
                address:
                  socket_address:
                    address: xxx.xxx.xxx.xxx
                    port_value: 10000

Does above endpointA and endpointB support path rewrite like below?

- match:
  - uri:
      prefix: /a
  rewrite:
    endpointA: /endpointA/a
    endpointB: /endpointB/a
- match:
  - uri:
      prefix: /b
  rewrite:
    endpointA: /endpointA/b
    endpointB: /endpointB/b

i checked envoy doc, does not find any info about that.

Have any idea about this?

@ningyougang ningyougang added the triage Issue requires triage label May 10, 2024
@phlax phlax added question Questions that are neither investigations, bugs, nor enhancements area/path_rewrite and removed triage Issue requires triage labels May 10, 2024
@phlax
Copy link
Member

phlax commented May 10, 2024

im wondering if this is more a question for https://github.com/envoyproxy/gateway

there is an overview of path rewriting here https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_routing that may be helpful

@ningyougang
Copy link
Author

I will close because http route supports path rewrite, but cluster's each endpoint does not support path rewrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/path_rewrite question Questions that are neither investigations, bugs, nor enhancements
Projects
None yet
Development

No branches or pull requests

2 participants