Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
Version
equal or higher than v1.17.10 and lower than v1.18.0
What happened?
I am attempting to configure a Gateway using cilium where I need to expose two different services (MQTT over SSL and WebSockets over SSL) using TLS Passthrough.
Both services share the same DNS hostname (SNI) but listen on different ports (e.g., 8883 and 8443).
According to the Gateway API specification, listeners should be distinct if their ports are different. However, when I attempt to configure two listeners with protocol: TLS, mode: Passthrough, and identical hostname values, the configuration fails/does not work as expected.
How can we reproduce the issue?
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: my-gateway
namespace: default
spec:
gatewayClassName: cilium
listeners:
# Listener 1: MQTT Secure
- name: mqtts
hostname: mqtt.example.com
port: 8883
protocol: TLS
tls:
mode: Passthrough
# Listener 2: WSS Secure (Same hostname, different port)
- name: wss
hostname: mqtt.example.com
port: 8443
protocol: TLS
tls:
mode: Passthrough
---
# Route 1: Attaches to the 'mqtts' listener on port 8883
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata:
name: route-mqtts
namespace: default
spec:
hostnames:
- mqtt.example.com
parentRefs:
- name: my-gateway
sectionName: mqtts # Explicitly targeting listener 1
rules:
- backendRefs:
- name: mqtt-service
port: 8883
---
# Route 2: Attaches to the 'wss' listener on port 8443
# This is where the conflict usually manifests
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata:
name: route-wss
namespace: default
spec:
hostnames:
- mqtt.example.com
parentRefs:
- name: my-gateway
sectionName: wss # Explicitly targeting listener 2
rules:
- backendRefs:
- name: wss-service
port: 8443
Note: I have the proper ReferenceGrant created.
The route 1st route works while the 2nd doesn't. I comment the route 1, the 2nd works, when I reactivate 1st, and the 2nd no longer works again
Cilium Version
1.17.1
Kernel Version
6.8.0-87-generic
Kubernetes Version
Client Version: v1.34.2
Kustomize Version: v5.7.1
Server Version: v1.34.2
Regression
I don't know.
Sysdump
No response
Relevant log output
Anything else?
No response
Cilium Users Document
- Are you a user of Cilium? Please add yourself to the Users doc
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
youngnick commentedon Nov 21, 2025
Thanks for this issue @ruben-caceiro-digiwest. Unfortunately, this sort of thing is currently a known issue with Cilium's implementation of Gateway API - because we pull all of the TLS config into a single port and filter chain, and use Cilium's eBPF datapath to get the packets to the right spot. It's on my list to fix, but it requires a reasonable rework of how we write out the filter chains, so I haven't got to it yet.
Totally a problem, will be fixed when we can. Sorry.
ruben-caceiro-digiwest commentedon Nov 21, 2025
fix: use LB IP for Talos machine config when serviceType is LoadBalancer
feat: add Talos immutable OS worker support (#13)
arybolovlev commentedon Jun 22, 2026
This issue seems to be addressed by this PR: #44889.
feat(gateway)!: add TLS-passthrough listeners to TenantGateway (#3342)