envoy icon indicating copy to clipboard operation
envoy copied to clipboard

matcher: add implementation for ServerNameMatcher

Open agrawroh opened this issue 5 months ago • 3 comments

Description

This PR adds a trie-based implementation for ServerNameMatcher [Link].

Example Config:

matcher_tree:
  input:
    name: input
    typed_config:
      "@type": type.googleapis.com/google.protobuf.StringValue
  custom_match:
    name: domain_matcher
    typed_config:
      "@type": type.googleapis.com/xds.type.matcher.v3.ServerNameMatcher
      domain_matchers:
      - domains:
        - "api.example.com"
        on_match:
          action:
            name: test_action
            typed_config:
              "@type": type.googleapis.com/google.protobuf.StringValue
              value: exact_match
      - domains:
        - "*.example.com"
        on_match:
          action:
            name: test_action
            typed_config:
              "@type": type.googleapis.com/google.protobuf.StringValue
              value: wildcard_match
      - domains:
        - "*.com"
        on_match:
          action:
            name: test_action
            typed_config:
              "@type": type.googleapis.com/google.protobuf.StringValue
              value: global_wildcard

Commit Message: matcher: add implementation for ServerNameMatcher Additional Description: This PR adds a trie-based implementation for ServerNameMatcher for both Network & HTTP. Risk Level: Low Testing: Unit Tests Docs Changes: Added Release Notes: Added

agrawroh avatar Jun 13 '25 08:06 agrawroh

As a reminder, PRs marked as draft will not be automatically assigned reviewers, or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/39884 was opened by agrawroh.

see: more, trace.

/wait Let me know if it's ready for another review.

kyessenov avatar Jun 18 '25 20:06 kyessenov

/wait Let me know if it's ready for another review.

@kyessenov Yes, I followed the IPMatcher and updated the code. Please do another pass and see if this looks good to you.

agrawroh avatar Jun 18 '25 21:06 agrawroh

Can you merge main, please, while I review? /wait

kyessenov avatar Jun 27 '25 15:06 kyessenov