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

matcher: add implementation for ServerNameMatcher #37271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agrawroh
Copy link
Contributor

@agrawroh agrawroh commented Nov 20, 2024

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

Copy link

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!

🐱

Caused by: #37271 was opened by agrawroh.

see: more, trace.

@agrawroh agrawroh force-pushed the impl_server_name branch 4 times, most recently from 9dc9748 to 7dc54e5 Compare November 21, 2024 06:17
Signed-off-by: Rohit Agrawal <[email protected]>
@agrawroh agrawroh marked this pull request as ready for review November 21, 2024 08:01
@agrawroh
Copy link
Contributor Author

/assign @kyessenov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants