Skip to content

Commit 0c22de5

Browse files
dforsberclaude
andcommitted
feat(chart): single-hostname TLSRoutes for app.boilstream.com
Adds TLSRoutes matching the bare {{ .Values.domain }} SNI for all four protocols (pgwire/kafka/flight/auth), round-robin across all pod backends. Keeps per-pod SNI routes for debugging and explicit pinning. Wildcard cert already covers the bare hostname. Chart: 0.3.0 -> 0.3.1 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fcaddef commit 0c22de5

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

charts/boilstream/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: |
66
support. Each pod participates in S3-based leader election and serves
77
per-user catalogs; failed pods are recovered from S3 backups.
88
type: application
9-
version: 0.3.0
9+
version: 0.3.1
1010
appVersion: "0.10.0"
1111
kubeVersion: ">=1.27.0"
1212
keywords:

charts/boilstream/templates/gateway.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ spec:
4646
kinds: [ { kind: TLSRoute } ]
4747
---
4848
{{- $vals := . -}}
49+
{{- /*
50+
Per-pod SNI TLSRoutes — kept for debugging and for clients that want to
51+
pin a specific pod (e.g. long-lived Kafka consumers that care about
52+
session stickiness across reconnects).
53+
*/}}
4954
{{- range $i, $_ := until (int .Values.replicas) }}
5055
{{- range $listener := list "pgwire" "kafka" "flight" "auth" }}
5156
{{- $port := index (dict "pgwire" 5432 "kafka" 9092 "flight" 50050 "auth" 8443) $listener }}
@@ -66,5 +71,39 @@ spec:
6671
---
6772
{{- end }}
6873
{{- end }}
74+
75+
{{- /*
76+
Bare-hostname TLSRoutes — the default entry point users hit.
77+
SNI matches {{ .Values.domain }} and Envoy round-robins new TCP
78+
connections across all per-pod ClusterIP backends.
79+
80+
Safe because every pod serves the same *.{{ .Values.domain }} wildcard
81+
cert, and boilstream's cluster mode lets any pod handle data-plane ops
82+
directly while brokers transparently forward catalog mutations to the
83+
leader over the :8444 internal API. PGWire sessions are TCP-sticky so
84+
prepared statements / transactions stay on the pod you landed on; a
85+
reconnect simply picks a new pod.
86+
*/}}
87+
{{- range $listener := list "pgwire" "kafka" "flight" "auth" }}
88+
{{- $port := index (dict "pgwire" 5432 "kafka" 9092 "flight" 50050 "auth" 8443) $listener }}
89+
apiVersion: gateway.networking.k8s.io/v1alpha2
90+
kind: TLSRoute
91+
metadata:
92+
name: boilstream-any-{{ $listener }}
93+
namespace: {{ $vals.Values.namespace }}
94+
spec:
95+
parentRefs:
96+
- { name: boilstream, sectionName: {{ $listener }} }
97+
hostnames:
98+
- {{ $vals.Values.domain }}
99+
rules:
100+
- backendRefs:
101+
{{- range $i, $_ := until (int $vals.Values.replicas) }}
102+
- name: boilstream-{{ $i }}
103+
port: {{ $port }}
104+
weight: 1
105+
{{- end }}
106+
---
107+
{{- end }}
69108
{{- end }}
70109

0 commit comments

Comments
 (0)