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

Route and Listener wildcard hostnames #478

Closed
Tracked by #608 ...
kate-osborn opened this issue Mar 17, 2023 · 2 comments · Fixed by #769
Closed
Tracked by #608 ...

Route and Listener wildcard hostnames #478

kate-osborn opened this issue Mar 17, 2023 · 2 comments · Fixed by #769
Assignees
Labels
area/httproute/core Relates to all Core features of HTTPRoute enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented.
Milestone

Comments

@kate-osborn
Copy link
Contributor

kate-osborn commented Mar 17, 2023

As a user of NKG with a large cluster utilizing many subdomains
I want to select the hostnames for my HTTPRoute and Gateway Listener spec using wildcard characters
So that I can easily select a set of subdomains to forward traffic to.

Acceptance

  • The Route and Listener Matching is implemented as referenced below.
  • If a hostname is duplicated in HTTP Route, the controller should treat the duplicates as the same hostname
  • Documentation is updated
  • Wildcard hostname examples is added here
  • Remove FIXME

Route and Listener Matching

Empty listener hostname

empty = not set in the listener
binding hostname = the hostname that the dataplane should match on

# listener hostname route hostname binding hostname
1.1 <empty> foo.example.com foo.example.com
1.2 <empty> *.example.com *.example.com

Regular listener hostname

# listener hostname route hostname binding hostname
2.1 foo.example.com foo.example.com foo.example.com
2.2 foo.example.com foo.example.org none
2.3 foo.example.com *.foo.example.com none
2.4 foo.example.com *.example.com foo.example.com

Wildcard listener hostname

# listener hostname route hostname binding hostname
3.1 *.example.com *.example.com *.example.com
3.2 *.example.com foo.example.com foo.example.com
3.3 *.example.com example.com none
3.4 *.example.com *.com *.example.com
3.5 *.example.com *.foo.example.com *.foo.example.com

Empty list of route hostnames

# listener hostname route hostname binding hostname
4.1 example.com empty list example.com
4.2 *.example.com empty list *.example.com
4.3 <empty> empty list <any>

<any> means it will match any host header.

Links

@kate-osborn kate-osborn changed the title API Surface: Wildcard hostnames Core API: Wildcard hostnames Mar 17, 2023
@kate-osborn kate-osborn added enhancement New feature or request area/httproute/core Relates to all Core features of HTTPRoute and removed proposal labels Mar 21, 2023
@kate-osborn kate-osborn added this to the v1.0.0 milestone Mar 21, 2023
@kate-osborn
Copy link
Contributor Author

This issue is blocked by #479

@mpstefan
Copy link
Collaborator

mpstefan commented May 26, 2023

Questions for discussion:

Documented edge case:

  • correct conflict handling across multiple listeners
    listener 1 foo.example.com
    listener 2 *.example.com
    hr1 foo.example.com
    hr2 foo.example.com

  • none of route's hostname matches the listener hostname -> Accepted False NoMatchingListener

  • some of the route's hostname don't match the listener hostname -> ?

@mpstefan mpstefan changed the title Core API: Wildcard hostnames Route wildcard hostnames May 26, 2023
@mpstefan mpstefan added refined Requirements are refined and the issue is ready to be implemented. and removed blocked Blocked by other issue labels May 31, 2023
@mpstefan mpstefan changed the title Route wildcard hostnames Route and Listener wildcard hostnames May 31, 2023
@pleshakov pleshakov removed their assignment Jun 1, 2023
@sjberman sjberman self-assigned this Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/httproute/core Relates to all Core features of HTTPRoute enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants