app: Warn when proxy public_addr is missing (#63683)

* app: Warn when proxy public_addr is missing

When app_service is enabled and proxy_service has no public_addr,
app FQDNs silently fall back to the cluster name, producing
URLs that don't resolve. Log a warning at startup so admins
know to set proxy_service.public_addr.

* app: Skip warning when all apps set their own public_addr

Address review feedback: apps can set public_addr individually,
bypassing proxy_service.public_addr entirely. Only warn when at least
one app lacks its own public_addr, and list affected app names in the
log message.

* app: Warn when proxy public_addr is missing

app_service does not work without proxy_service.public_addr. Log a
warning at startup in applyAppsConfig so operators see the problem
before users hit the runtime error.

Simplify the check to a single condition on proxy_service.public_addr
rather than inspecting individual app public_addr fields - the proxy
address is required regardless
This commit is contained in:
Julia Ogris
2026-02-17 00:03:50 +00:00
committed by GitHub
parent bfc15e0686
commit fc8b556d9f
+8
View File
@@ -2042,6 +2042,14 @@ func applyAppsConfig(fc *FileConfig, cfg *servicecfg.Config) error {
// Apps are enabled.
cfg.Apps.Enabled = true
// Warn if proxy_service is enabled in the same config but has no
// public_addr. Without it, app access does not work.
if fc.Proxy.Enabled() && len(fc.Proxy.PublicAddr) == 0 {
slog.WarnContext(context.Background(),
"app_service requires proxy_service.public_addr to route requests; app access will not work until it is set",
)
}
// Enable debugging application if requested.
cfg.Apps.DebugApp = fc.Apps.DebugApp