-
Notifications
You must be signed in to change notification settings - Fork 703
cmd/contour: support defaulting HTTP protocol versions #2622
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
|
Marked as draft. @youngnick LMK what you think of this approach. |
Codecov Report
@@ Coverage Diff @@
## master #2622 +/- ##
==========================================
+ Coverage 76.78% 76.92% +0.14%
==========================================
Files 71 71
Lines 5540 5591 +51
==========================================
+ Hits 4254 4301 +47
- Misses 1199 1203 +4
Partials 87 87
|
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, nice work.
844059c to
c3d8821
Compare
|
@youngnick added docs to configuration file page and fax |
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, nice FAQ.
c3d8821 to
08b73b2
Compare
| // "HTTP/1.1" and "HTTP/2". | ||
| // | ||
| // If this field not specified, all supported versions are accepted. | ||
| DefaultHTTPVersions []string `yaml:"default-http-versions"` |
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.
"Default" seems like the wrong term here, it's more like "Enabled" since this is overriding the "supported" versions.
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.
The intention is to set the default HTTP versions for all the proxy objects. Later we can add per-proxy versions to the VirtualHost spec to override these defaults. This also gives us the space to add something like "enabled versions", which would restrict what can become the defaults.
| // DefaultHTTPVersions defines the default set of HTTPS | ||
| // versions the proxy should accept. HTTP versions are | ||
| // strings of the form "HTTP/xx". Supported versions are | ||
| // "HTTP/1.1" and "HTTP/2". |
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.
Do we need to include HTTP in the value? The parameter name specifies it can only be HTTP.
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.
It's not strictly necessary, but IMHO it reads better and makes the config more obvious :)
| More importantly, the HTTPProxy CRD is designed with inclusion in mind, a feature that enables administrators to configure top-level ingress settings (for example, which virtual hosts are available to each team), while delegating the lower-level configuration (for example, the mapping between paths and backend services) to each development team. | ||
| More information about the HTTPProxy API can be found [in the HTTPProxy documentation][1]. | ||
|
|
||
| # Q: When I load my site in Safari, it shows me an empty page. Developer tools show that the HTTP response was 421. Why does this happen? |
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.
Should we add the version tested of Safari? Presuming eventually in the future the issue gets resolved?
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 can't be sure about the versions, so I'd prefer to update this if we ever find out there is a version that fixes the problem.
08b73b2 to
290d068
Compare
Add Contour config file for defaulting the HTTP protocol version accepted by the proxy listener. This principally applies to HTTPS listeners, where HTTP/1.1 and HTTP/2 can be accepted on the same listener. If no configuration is specified, all HTTP protocol versions are automatically detected and supported. Otherwise, HTTP/1.1 and HTTP/2 can be individually toggled. There is no support for per-resource configuration in this change, but it can easily be supported if necessary. The config file syntax looks like this: ``` default-http-versions: - http/1.1 - http/2 ``` This updates projectcontour#2619. Signed-off-by: James Peach <[email protected]>
290d068 to
5d4f828
Compare
Add Contour config file for defaulting the HTTP protocol version
accepted by the proxy listener. This principally applies to HTTPS
listeners, where HTTP/1.1 and HTTP/2 can be accepted on the same
listener.
If no configuration is specified, all HTTP protocol versions are
automatically detected and supported. Otherwise, HTTP/1.1 and HTTP/2
can be individually toggled. There is no support for per-resource
configuration in this change, but it can easily be supported if
necessary.
The config file syntax looks like this:
This updates #2619.
Signed-off-by: James Peach [email protected]