caddyserver / ingress

WIP Caddy 2 ingress controller for Kubernetes
Apache License 2.0
620 stars 70 forks source link

Why limit the port to 80 and 443? #194

Open cawirawa opened 7 months ago

cawirawa commented 7 months ago

Issue

At present, Caddy Ingress is restricted to handling TCP connections exclusively on ports 80 and 443. While this suits typical HTTP/HTTPS scenarios, there are use cases where users need to manage TCP connections on other ports, such as those used for gRPC services.

Requested Feature

I propose expanding the capabilities of Caddy Ingress to allow users to define TCP connections on arbitrary ports. This enhancement would make Caddy Ingress a more versatile tool, particularly in environments where non-HTTP protocols like gRPC are utilized.

Use Cases

Rationale

The ability to define TCP connections on arbitrary ports provides greater flexibility and aligns with diverse deployment scenarios. Enabling Caddy Ingress to manage non-HTTP protocols allows users to consolidate their configuration and benefit from Caddy's features in a broader range of use cases.

Proposed Implementation

Introduce a configuration option to specify the ports for TCP connections, allowing users to define arbitrary ports for non-HTTP services. This could be achieved through additions to the Caddy Ingress configuration file or via annotations on Kubernetes services.

cruizba commented 4 months ago

+1. I will go all-in with caddy in kubernetes if such functionality someday exists