-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Labels
area/httproute/coreRelates to all Core features of HTTPRouteRelates to all Core features of HTTPRouteenhancementNew feature or requestNew feature or requestrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.
Milestone
Description
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
- https://github.com/kubernetes-sigs/gateway-api/blob/20be22d3a2976374772170a6a55a9c8228d1e8c8/apis/v1beta1/httproute_types.go#L59
- Conformance tests
- https://github.com/kubernetes-sigs/gateway-api/blob/7631139b1ea4beaf575a49f56c56aa26f1e11e22/conformance/tests/httproute-hostname-intersection.go#L35 passes , however, empty section Name i is required.
- https://github.com/kubernetes-sigs/gateway-api/blob/7631139b1ea4beaf575a49f56c56aa26f1e11e22/conformance/tests/httproute-listener-hostname-matching.go#L33 passes
Metadata
Metadata
Assignees
Labels
area/httproute/coreRelates to all Core features of HTTPRouteRelates to all Core features of HTTPRouteenhancementNew feature or requestNew feature or requestrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.