-
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
Add support for wildcard hosts on Ingresses #3381
Add support for wildcard hosts on Ingresses #3381
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3381 +/- ##
==========================================
+ Coverage 76.66% 76.70% +0.04%
==========================================
Files 100 100
Lines 7066 7088 +22
==========================================
+ Hits 5417 5437 +20
- Misses 1533 1535 +2
Partials 116 116
|
How to run Ingress conformance tests:
|
Current caveats/TODOs:
|
Going to mark this as ready just so it notifies people to review to get some feedback |
Still TODO: Add testing and fix for combining a catchall virtualhost (default backend or no supplied hostname in a rule) with a wildcard route b/c as of right now they are both using Right now this change attempts to do the following:
Notes:
|
I don't get this one. Are you saying the current catchall vhost is implemented using a
Is that part of the Ingress spec? Really? Doesn't feel like we should be doing that.
I didn't think that |
We have this: contour/internal/envoy/v3/route.go Lines 263 to 266 in 711001c
Which was introduced b/c of 8b16fd8 This is a contour-specific thing but presumably we would want wildcard routes to ignore the port if present just as on a precise hostname. If we try to do a route match for
To clarify, this is only implemented with a less specific route domain match b/c of the port issue as described above. To implement ignoring a supplied port in the host, I've made it so wildcard routes match Another solution would be to strip the port from the |
GatewayAPI Listener.hostname says it can be empty or |
This requires #3458 as it makes life a lot simpler! |
6142add
to
525a0c1
Compare
This still relies on envoyproxy/envoy#15215 in an Envoy release, waiting for Envoy 1.18 |
Now that we have #3458 it removes all the logic we would have needed around polluting the |
Still validating ingress conformance tests again since they are flaky Getting a 503 on https://github.com/kubernetes-sigs/ingress-controller-conformance/blob/79bd068cbb31d77c2a060f61eea795f9791a3d48/features/host_rules.feature#L70-L76 when running the tests |
Note: With this change we will need to update Envoy first before Contour b/c we are using a net new Envoy Lua API |
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.
this looks pretty good to me, pending a new Envoy release.
|
Signed-off-by: Sunjay Bhatia <[email protected]>
Adds regex type for header matches Signed-off-by: Sunjay Bhatia <[email protected]>
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 with one small followup.
Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: Sunjay Bhatia <[email protected]>
So resource type doesn't conflict Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: Sunjay Bhatia <[email protected]>
We are testing against k8s 1.18 which does not have Ingress v1 Signed-off-by: Sunjay Bhatia <[email protected]>
Going to try to fix siteproof in a separate PR |
See #3596 for siteproof fixes |
This should be ready for review again Note if we merge this for 1.15 we will need to mention in upgrade instructions that the Envoy deployment has to be updated first before Contour. This is a hard requirement if you are using Ingresses with wildcard hostnames. If you are not, this is not as critical (things will work if you upgrade Contour first). |
Signed-off-by: Sunjay Bhatia <[email protected]>
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
Signed-off-by: Sunjay Bhatia <[email protected]>
We have ommmitted k8s v1.18 Signed-off-by: Sunjay Bhatia <[email protected]>
we want to implement
to match on the ":authority" header that is more strict and will only
match one DNS label wildcard
certificate
Fixes #2138
Updates #2139