You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d624049
Browse filesBrowse the repository at this point in the historyBrowse files
feat(gateway): allow tlsPassthroughListeners under dns01 and existingSecret
The refusal existed because Cilium 1.19.5 served every Gateway port
from one Envoy listener matched by SNI alone, so the "*.<apex>"
terminate listener of the wildcard modes and a passthrough listener
under the apex could reach each other's backend. The shipped Cilium
1.20.2 gives each port its own Envoy listener when SNI overlaps across
ports, and Gateway API treats listeners on different ports as
compatible, so the pair is served as declared. edge still refuses the
field: it renders no TLS listener for an entry to bind to.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
Copy file name to clipboardExpand all lines: api/gateway/v1alpha1/tenantgateway_types.go
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -184,9 +184,10 @@ type TLSPassthroughListener struct {
184
184
// native port (e.g. 5432 for PostgreSQL). Must be 1..65535, unique
185
185
// across the list, and neither 80 nor 443 — the Gateway's own http
186
186
// (80) and TLS-terminate (443) listeners already own those ports.
187
-
// It is not an access boundary: on the Cilium version this
188
-
// platform pins, the backend answers this listener's SNI on every
189
-
// port the Gateway exposes, so the hostname is what gates reach.
187
+
// It is not an access boundary: an implementation may serve every
188
+
// port of the Gateway from one proxy listener matched by SNI alone,
189
+
// and Cilium does so until the Gateway carries a configuration that
190
+
// splits it per port, so the hostname is what gates reach.
190
191
// +kubebuilder:validation:Minimum=1
191
192
// +kubebuilder:validation:Maximum=65535
192
193
// +required
@@ -246,7 +247,7 @@ type TLSPassthroughListener struct {
246
247
// +kubebuilder:validation:XValidation:rule="!has(self.tlsPassthroughListeners) || self.tlsPassthroughListeners.all(l, self.tlsPassthroughListeners.filter(o, o.port == l.port).size() == 1)",message="tlsPassthroughListeners: each listener must occupy a distinct port"
247
248
// +kubebuilder:validation:XValidation:rule="!has(self.tlsPassthroughListeners) || self.tlsPassthroughListeners.all(l, l.hostname == self.apex || l.hostname.endsWith('.' + self.apex))",message="tlsPassthroughListeners: hostname must equal the tenant apex or be a subdomain of it"
248
249
// +kubebuilder:validation:XValidation:rule="!has(self.tlsPassthroughListeners) || !has(self.tlsPassthroughServices) || self.tlsPassthroughListeners.all(l, !(l.name in self.tlsPassthroughServices))",message="tlsPassthroughListeners: name collides with a tlsPassthroughServices entry; both render a tls-<name> Gateway listener"
249
-
// +kubebuilder:validation:XValidation:rule="!has(self.tlsPassthroughListeners) || size(self.tlsPassthroughListeners) == 0 || !has(self.certMode) || self.certMode == 'http01'",message="tlsPassthroughListeners: supported with certMode http01 only; dns01 and existingSecret serve the tenant from one wildcard terminate listener that the pinned Cilium cannot keep apart from a passthrough listener under the same apex, and edge terminates TLS upstream and renders no TLS listener to sit beside"
250
+
// +kubebuilder:validation:XValidation:rule="!has(self.tlsPassthroughListeners) || size(self.tlsPassthroughListeners) == 0 || !has(self.certMode) || self.certMode != 'edge'",message="tlsPassthroughListeners: unsupported with certMode edge, which terminates TLS upstream and renders no TLS listener to sit beside"
250
251
typeTenantGatewaySpecstruct {
251
252
// MaxLength is the DNS ceiling, so it rejects nothing resolvable,
252
253
// and it is not cosmetic: it is one of the three bounds the
returnfmt.Errorf("tlsPassthroughListeners: unsupported with certMode %q; only http01 renders the per-hostname terminate listeners a passthrough hostname can sit beside. dns01 and existingSecret serve the whole apex from one wildcard terminate listener, and the pinned Cilium routes both by SNI alone in one Envoy listener, so a connection would reach the passthrough backend; edge terminates TLS at the class provider and renders no TLS listener at all", mode)
307
+
returnfmt.Errorf("tlsPassthroughListeners: unsupported with certMode %q; edge terminates TLS at the class provider and renders no TLS listener at all", mode)
335
308
}
336
309
337
310
// rendersPassthroughListeners reports whether a certificate mode renders
0 commit comments