Code Monkey home page Code Monkey logo

Comments (3)

tonya11en avatar tonya11en commented on June 23, 2024

You'll likely want to do something like:

  1. Use the gRPC field extraction filter to pull out the field and put it in the dynamic metadata for the request.
  2. Configure your routes to match on dynamic_metadata.

from envoy.

MichelSkr avatar MichelSkr commented on June 23, 2024

@tonya11en thanks for the suggestion.
I used the grpc_field_extraction filter and I can extract the needed field

I have created a dynamic_metadata under route match as follow

                - name: local_service
                  domains: ["*"]
                  routes:
                  - match:
                      prefix: /path/
                      grpc: {}
                      dynamic_metadata:
                      - filter: envoy.filters.http.grpc_field_extraction
                        path:
                        - key: key1
                        value:
                          list_match:
                            one_of:
                              string_match:
                                exact: "value1"                       
                    route:
                      cluster: nrc_cluster1 ```


But my requests never match any route and fail.

anything wrong/missing with my config? 

from envoy.

MichelSkr avatar MichelSkr commented on June 23, 2024

I had to add a lua filter to the config.
the lua filter that I added was failing and didn't do anything but somehow after adding the lua the route matching started to work.

I noticed Others had similar problem #19910 and might be related to route caching.

seems lua filter enforces a refresh to the route config

from envoy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.