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

TCP Layer 4 Routing #3086

Closed
JasonMorgan opened this issue Nov 1, 2020 · 7 comments
Closed

TCP Layer 4 Routing #3086

JasonMorgan opened this issue Nov 1, 2020 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@JasonMorgan
Copy link
Contributor

I'd like the ability to forward a particular port to a particular service without needing HTTPS. An example being, I run a CI tool called concourse and it gives me the ability to launch ssh sessions to ci jobs. In order to broker the ssh session the cli tool opens a connection to the concourse web app over port 2222. Using an NGINX ingress I accomplish this by creating a config map that instructs the ingress controller to forward everything it gets on 2222 to my concourse web service, tcp: {2222: "tools/ci-concourse-web:2222"}. As of right now this doesn't seem possible with Contour.

@JasonMorgan JasonMorgan added kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Nov 1, 2020
@stevesloka
Copy link
Member

I see this as a new CRD, something like TCPProxy where you can define the L4 bits, IP Address, ports, etc. I think the starting bits can be limited and just document that (i.e. we're not going to deal with IP address management, etc), but overall I think this can be helpful for the community while still be limited compared to other projects that are full "L4" style proxies.

We just discussed this a bit in #2809 (#2809 (comment)) as well.

@youngnick
Copy link
Member

The problem with defining things like IP address is that it requires the Envoy deployment to either have that IP address present on the Linux host, or have certain Linux features enabled so that it can add any address, even if it's not routable.

One of the reasons I've been reluctant to just go ahead with this is that there is a long list of things that you have to achieve with your Envoy deployment before you can request an arbitrary IP address and port (which I see as fundamental for this sort of load balancing). Contour has no way to determine how Envoy will react to sending configs that involve L4 details like IP address without just sending it, and if the config is rejected, Envoy will stop receiving updates from Contour until restarted (this is #1176).

I think that the approach nginx seems to take (you can forward any port on whatever IP address(es) Envoy is listening on) is probably more achievable, but will require a new CRD, as you say.

@stevesloka
Copy link
Member

Yeah I was starting too detailed and working out. I think an initial implementation could be to do how we handle listeners today which is to listen on 0.0.0.0 over ports 80 & 443 (configurable).

My suggestion is to allow L4 load balancers to be defined the same way, listening on ports that are defined in the CRD over 0.0.0.0. A user could add those ports to the Envoy service to expose them from an external load balancer if that was their environment.

This leaves the other bits like assigning IPs, etc, etc, etc to another controller or implementation based upon the environment, but is simple enough to give users a bit more functionality to fill in any gaps today.

youngnick pushed a commit to youngnick/contour that referenced this issue Jan 19, 2021
As part of implementing Service APIs, it's necessary to reconsider Contour's insecure to secure redirect functionality.
This document suggests keeping the functionality, while allowing additional listening ports to be defined.

Updates projectcontour#1300
Updates projectcontour#2922
Updates projectcontour#3086

Signed-off-by: Nick Young <ynick@vmware.com>
@spines83
Copy link

Hey all! Just wanted to toss in another use case where this became an active issue.

Contour is the primary ingress controller on a cluster we're using and we needed to install GitLab on that cluster.

In order to clone/push projects from GitLab over SSH, we need to be able to run an SSH connection through an ingress controller to the workload. SSH uses its own non-TLS encryption so this has forced us into a situation where we need to run another ingress controller side-by-side (out of the box, GitLab will attempt to deploy another ingress controller).

In most of the environments I've worked in, folks prefer the ability to run one ingress controller where they can (and some will explicitly set up OPA/Kyverno policies to prevent additional ones from being created by users of the platform), but this has put us into a situation where we either need to run two ingress solutions side-by-side or strip out Contour and replace it with another solution.

Would be awesome if TCPProxy could be expanded to allow for non-TLS passthrough since folks running some flavor of git w/ SSH on their platforms is a pretty common use case.

@youngnick
Copy link
Member

Thanks for the additional use case @spines83, that's very useful.

Copy link

The Contour project currently lacks enough contributors to adequately respond to all Issues.

This bot triages Issues according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the Issue is closed

You can:

  • Mark this Issue as fresh by commenting
  • Close this Issue
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 24, 2023
Copy link

The Contour project currently lacks enough contributors to adequately respond to all Issues.

This bot triages Issues according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the Issue is closed

You can:

  • Mark this Issue as fresh by commenting
  • Close this Issue
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants