Removes Wild Cloud cruft.
This commit is contained in:
@@ -79,13 +79,13 @@ func (api *API) reconcileNetworking() {
|
||||
}
|
||||
|
||||
// Build HAProxy routes from registered domains
|
||||
var instanceRoutes []haproxy.InstanceRoute
|
||||
var l4Routes []haproxy.L4Route
|
||||
var httpRoutes []haproxy.HTTPRoute
|
||||
|
||||
for _, dom := range doms {
|
||||
switch dom.EffectiveBackendType() {
|
||||
case domains.BackendTCPPassthrough:
|
||||
instanceRoutes = append(instanceRoutes, haproxy.InstanceRoute{
|
||||
l4Routes = append(l4Routes, haproxy.L4Route{
|
||||
Name: dom.DomainName,
|
||||
Domain: dom.DomainName,
|
||||
BackendIP: extractHost(dom.EffectiveBackendAddress()),
|
||||
@@ -143,7 +143,7 @@ func (api *API) reconcileNetworking() {
|
||||
HTTPRoutes: activeHTTPRoutes,
|
||||
CertsDir: certsDir,
|
||||
}
|
||||
haproxyCfg := api.haproxy.GenerateWithOpts(instanceRoutes, nil, genOpts)
|
||||
haproxyCfg := api.haproxy.GenerateWithOpts(l4Routes, nil, genOpts)
|
||||
|
||||
if err := api.haproxy.WriteConfig(haproxyCfg); err != nil {
|
||||
// Validation failed — identify and exclude broken domains, then retry
|
||||
@@ -157,8 +157,8 @@ func (api *API) reconcileNetworking() {
|
||||
exclude[d] = true
|
||||
}
|
||||
|
||||
var filteredInstances []haproxy.InstanceRoute
|
||||
for _, r := range instanceRoutes {
|
||||
var filteredInstances []haproxy.L4Route
|
||||
for _, r := range l4Routes {
|
||||
if !exclude[r.Domain] {
|
||||
filteredInstances = append(filteredInstances, r)
|
||||
}
|
||||
@@ -243,7 +243,7 @@ func (api *API) reconcileNetworking() {
|
||||
|
||||
slog.Info("reconcile: networking updated",
|
||||
"domains", len(doms),
|
||||
"l4Routes", len(instanceRoutes),
|
||||
"l4Routes", len(l4Routes),
|
||||
"l7Routes", len(httpRoutes),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user