-
Notifications
You must be signed in to change notification settings - Fork 689
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
Allow wildcard fqdn's for HTTPProxy resources #4145
Conversation
Fixes projectcontour#1228 Signed-off-by: Steve Sloka <slokas@vmware.com>
Signed-off-by: Steve Sloka <slokas@vmware.com>
Codecov Report
@@ Coverage Diff @@
## main #4145 +/- ##
==========================================
- Coverage 74.64% 72.95% -1.69%
==========================================
Files 112 115 +3
Lines 9722 10096 +374
==========================================
+ Hits 7257 7366 +109
- Misses 2309 2574 +265
Partials 156 156
|
Signed-off-by: Steve Sloka <slokas@vmware.com>
10ec51f
to
4fb69a9
Compare
Signed-off-by: Steve Sloka <slokas@vmware.com>
32789c5
to
902e787
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work.
(once the tests are fixed, obviously).
#4147 might be a fix to the test flakes here |
internal/dag/httpproxy_processor.go
Outdated
// as Envoy's virtualhost hostname wildcard matching can match multiple | ||
// labels. This match ignores a port in the hostname in case it is present. | ||
if strings.HasPrefix(rootProxy.Spec.VirtualHost.Fqdn, "*.") { | ||
r.HeaderMatchConditions = []HeaderMatchCondition{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think maybe only change I would make is to pull this out into a helper now its used in a few places, so we get something like:
if strings.HasPrefix(rootProxy.Spec.VirtualHost.Fqdn, "*.") {
r.HeaderMatchConditions = append(r.HeaderMatchConditions, wildcardDomainHeaderMatch(rootProxy.Spec.VirtualHost.Fqdn))
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: Steve Sloka <slokas@vmware.com>
Signed-off-by: Steve Sloka <slokas@vmware.com>
That still may help, but what I found was I think there was a timing issue since many of our tests use |
Updates operator per Contour changes: projectcontour/contour#4141 projectcontour/contour#4138 projectcontour/contour#4145 Signed-off-by: Steve Kriss <krisss@vmware.com>
Updates operator per Contour changes: projectcontour/contour#4141 projectcontour/contour#4138 projectcontour/contour#4145 Signed-off-by: Steve Kriss <krisss@vmware.com>
Fixes #1228
Signed-off-by: Steve Sloka slokas@vmware.com