-
Notifications
You must be signed in to change notification settings - Fork 703
use sni for clusters when requestHeaderPolicy is set #2442
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
Conversation
|
Thank you @stevesloka! It was nice to review this as I was walking through the code base to determine how to implement this. Thanks for the quick turn around! |
Codecov Report
@@ Coverage Diff @@
## master #2442 +/- ##
==========================================
+ Coverage 76.67% 76.75% +0.07%
==========================================
Files 68 68
Lines 5506 5515 +9
==========================================
+ Hits 4222 4233 +11
+ Misses 1187 1186 -1
+ Partials 97 96 -1
Continue to review full report at Codecov.
|
youngnick
left a comment
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.
Like the approach, just would like more explanation of what's happening in the godocs.
| ResponseHeadersPolicy *HeadersPolicy | ||
|
|
||
| // SNI describes how the SNI is set on a Cluster | ||
| SNI string |
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 this could use a little explanation of how the field works.
What happens when it's set?
What happens when it's the empty string?
It seems from the rest of the code that if it's not set having the field be present does nothing, it would be good to have that contract explicitly stated here.
A link to the Envoy docs or something would maybe do as well.
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.
That's great, thanks.
internal/dag/builder.go
Outdated
| return routes | ||
| } | ||
|
|
||
| // determineSNI decides what the SNI should be on the request |
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.
Some explanation of what happens where there should be no SNI on the request would be good.
Signed-off-by: Steve Sloka <[email protected]>
youngnick
left a comment
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, thanks for the changes.
Fixes #2437 by setting the SNI for the request with the following rules:
//cc @jeremyrickard
Signed-off-by: Steve Sloka [email protected]