Skip to content

Support Termination mode for TLS listener protocol (TLSRoutes, TCPRoutes) #5461

Closed
@Rycieos

Description

@Rycieos

This is an enhancement request, but it could also be considered a bug, as the Kubernetes Gateway API might require this support (see @skriss's comment).

Description

A Gateway object with a Listener that accepts TLSRoutes should support mode: Terminate as detailed in the GatewayTLSConfig spec.

User story

I have an application that speaks a nonstandard application protocol over TCP. I want the traffic wrapped in TLS. And since I want my application to be as simple as possible, I want the Gateway to terminate the TLS tunnel.

This can be specified with this example Gateway Spec:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
spec:
  listeners:
  - allowedRoutes:
      kinds:
      - group: gateway.networking.k8s.io
        kind: TLSRoute
    name: tls
    port: 5000
    protocol: TLS
    tls:
      mode: Terminate
      certificateRefs:
      - name: my-secret

And a TLSRoute like:

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
spec:
  hostnames:
    - example.com
  rules:
    - backendRefs:
      - kind: Service
        name: example
        port: 3102

Issue

Currently, if this Gateway is created, Contour returns an error on the Gateway object with the message:

Listener.TLS.Mode must be "Passthrough" when protocol is "TLS".

Metadata

Metadata

Assignees

Labels

area/gateway-apiIssues or PRs related to the Gateway (Gateway API working group) API.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions