feat(deploy): externalRouting toggle to keep apps off Traefik
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m26s
CI / docker (push) Successful in 1m5s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 41s

Adds a boolean `externalRouting` flag (default `true`) on
ResolvedContainerConfig. When `false`, TraefikLabelBuilder emits only
the identity labels (`managed-by`, `cameleer.*`) and skips every
`traefik.*` label, so the container is not published by Traefik.
Sibling containers on `cameleer-traefik` / `cameleer-env-{tenant}-{env}`
can still reach it via Docker DNS on whatever port the app listens on.

TDD: new TraefikLabelBuilderTest covers enabled (default labels present),
disabled (zero traefik.* labels), and disabled (identity labels retained)
cases. Full module unit suite: 208/0/0.

Plumbed through ConfigMerger read, DeploymentExecutor snapshot, UI form
state, Resources tab toggle, POST payload, and snapshot-to-form mapping.
Rule files updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-23 18:03:48 +02:00
parent ade1733418
commit 165c9f10e3
13 changed files with 98 additions and 7 deletions

View File

@@ -33,7 +33,8 @@ public final class ConfigMerger {
boolVal(appConfig, envConfig, "replayEnabled", true),
stringVal(appConfig, envConfig, "runtimeType", "auto"),
stringVal(appConfig, envConfig, "customArgs", ""),
stringList(appConfig, envConfig, "extraNetworks")
stringList(appConfig, envConfig, "extraNetworks"),
boolVal(appConfig, envConfig, "externalRouting", true)
);
}

View File

@@ -22,7 +22,8 @@ public record ResolvedContainerConfig(
boolean replayEnabled,
String runtimeType,
String customArgs,
List<String> extraNetworks
List<String> extraNetworks,
boolean externalRouting
) {
public long memoryLimitBytes() {
return (long) memoryLimitMb * 1024 * 1024;