Skip to content

Route and Listener wildcard hostnames #478

Closed
@kate-osborn

Description

@kate-osborn

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

Metadata

Metadata

Assignees

Labels

area/httproute/coreRelates to all Core features of HTTPRouteenhancementNew feature or requestrefinedRequirements are refined and the issue is ready to be implemented.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions