fix: Pass Subdomains field through to HAProxy InstanceRoute

The reconciliation was building InstanceRoutes without setting the
Subdomains field, so all services were exact-match only — breaking
wildcard subdomain routing for *.cloud.payne.io and *.cloud2.payne.io.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 20:45:25 +00:00
parent 56b7dd800d
commit 1fca2b8032

View File

@@ -41,9 +41,10 @@ func (api *API) reconcileNetworking() {
switch svc.Backend.Type { switch svc.Backend.Type {
case services.BackendTCPPassthrough: case services.BackendTCPPassthrough:
instanceRoutes = append(instanceRoutes, haproxy.InstanceRoute{ instanceRoutes = append(instanceRoutes, haproxy.InstanceRoute{
Name: svc.Domain, Name: svc.Domain,
Domain: svc.Domain, Domain: svc.Domain,
BackendIP: extractHost(svc.Backend.Address), BackendIP: extractHost(svc.Backend.Address),
Subdomains: svc.Subdomains,
}) })
case services.BackendHTTP: case services.BackendHTTP:
httpRoutes = append(httpRoutes, haproxy.HTTPRoute{ httpRoutes = append(httpRoutes, haproxy.HTTPRoute{