Skip to content
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

annotation support for http2 #2402

Closed
wants to merge 1 commit into from

Conversation

shraykay
Copy link

What this PR does / why we need it:
http2 support at the ingress level via an annotation

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:
please lmk if I've missed any areas on the nginx.conf go template or if I should place the attachment from annotation to server in another function or section.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 23, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shraykay
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: nicksardo

Assign the PR to them by writing /assign @nicksardo in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 23, 2018
@aledbf
Copy link
Member

aledbf commented Apr 23, 2018

@shraykay I am not sure if we should add this annotation. The reason is enabling http2 on port 80 breaks HTTP traffic and is not possible to do it only for some paths.

@aledbf
Copy link
Member

aledbf commented Apr 23, 2018

I already tried this. Please check #2313

@mhamrah
Copy link

mhamrah commented Apr 23, 2018

Can you elaborate on how it 'breaks http traffic'? I don't think it should be up to the nginx ingress to enforce which application protocol should be allowed on which port; let the upstream handler determine how to process the request. An upstream might only want to handle http2, gRPC, or do some stream-level introspection to determine whether it's an http/http2 request.

Yes, there might be some circumstances where an http2 rule interferes with an http rule, but that's a configuration problem of the user.

@aledbf
Copy link
Member

aledbf commented Apr 23, 2018

Can you elaborate on how it 'breaks http traffic'?

If you enable http2 on port 80 and try to make an http request you receive a binary response (http2). There is no fallback to http so only http2 traffic works (his is fine if you have only one Ingress per hostname) This leads to not being able to distinguish if the error is the ingress controller and nginx.

An upstream might only want to handle http2, gRPC, or do some stream-level introspection to determine whether it's an http/http2 request.

Sure but nginx can't and that's the problem. Please check https://forum.nginx.org/read.php?29,278877,278929#msg-278929

@aledbf aledbf added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Apr 24, 2018
@aledbf
Copy link
Member

aledbf commented Apr 24, 2018

Closing. We can add this feature but not as an annotation but in the configuration configmap.
Please check #2189 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants