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

feat: Add support for h2c communications #10918

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rsafonseca
Copy link
Contributor

What this PR does / why we need it:

This PR adds support for h2c protocol. Since it's not possible to enable http2 protocol support on port 80, and h2c is a valid protocol for a number of applications, this creates the requirements for communicating with ingresses over h2c when required (e.g. clear text GRPC)

Types of changes

  • New feature (non-breaking change which adds functionality)

Which issue/s this PR fixes

fixes #10429
fixes #10430
fixes #2444
fixes #9493

probably a bunch of others where folks stumble into problems due to GRPC not working with insecure connections

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • All new and existing tests passed.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rsafonseca
Once this PR has been reviewed and has the lgtm label, please assign rikatz for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/helm Issues or PRs related to helm charts labels Jan 26, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 26, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @rsafonseca. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

netlify bot commented Jan 26, 2024

Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit c0ffcd2
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/65b3c1b890f3bc0008138067

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 26, 2024
@strongjz
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 26, 2024
@strongjz strongjz added this to the release-1.11 milestone Jan 26, 2024
@rikatz
Copy link
Contributor

rikatz commented Jan 26, 2024

@rsafonseca what about setting the "http2 on" directive on the server block? I am fixing it right now for nginx v1.25, and IIUC this solves the problem

@rsafonseca
Copy link
Contributor Author

You mean as opposed to setting it on the listen line? I've been working with h2c on ingress with a custom template for a while with no issues :)

@rikatz
Copy link
Contributor

rikatz commented Jan 26, 2024

Yeah, I'm generating the image with nginx v1.25 and http2 listen directive right now :) once it is ready di you mind testing it?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 27, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rsafonseca
Copy link
Contributor Author

@rikatz can you post a link to the build so I can test it Monday?

@rsafonseca
Copy link
Contributor Author

Is this no longer the case @rikatz ? #3938 (comment)
Afaik nginx never supported http and h2c on the same port, hence this PR

@rsafonseca
Copy link
Contributor Author

Answering myself https://hg.nginx.org/nginx/rev/08ef02ad5c54 looks like this is now possible since nginx 1.25.1 :yay: :)

@strongjz
Copy link
Member

Is this still needed with v1.10.0 upgrading to nginx 1.25 now? If not can you close it @rsafonseca

@jetersen
Copy link
Contributor

Would be very interested in how use this feature from nginx 1.25 via ingress nginx helm chart 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Issues or PRs related to helm charts cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
5 participants