feat: make route control and replay configurable per environment/app
Added routeControlEnabled and replayEnabled to ResolvedContainerConfig, flowing through the three-layer config merge (global -> env -> app). Both default to true. Admins can disable them per environment (e.g. prod) via the defaultContainerConfig JSONB, or per app via the app's containerConfig JSONB. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -275,8 +275,8 @@ public class DeploymentExecutor {
|
|||||||
envVars.put("CAMELEER_APPLICATION_ID", app.slug());
|
envVars.put("CAMELEER_APPLICATION_ID", app.slug());
|
||||||
envVars.put("CAMELEER_ENVIRONMENT_ID", env.slug());
|
envVars.put("CAMELEER_ENVIRONMENT_ID", env.slug());
|
||||||
envVars.put("CAMELEER_SERVER_URL", config.serverUrl());
|
envVars.put("CAMELEER_SERVER_URL", config.serverUrl());
|
||||||
envVars.put("CAMELEER_ROUTE_CONTROL_ENABLED", "true");
|
envVars.put("CAMELEER_ROUTE_CONTROL_ENABLED", String.valueOf(config.routeControlEnabled()));
|
||||||
envVars.put("CAMELEER_REPLAY_ENABLED", "true");
|
envVars.put("CAMELEER_REPLAY_ENABLED", String.valueOf(config.replayEnabled()));
|
||||||
if (bootstrapToken != null && !bootstrapToken.isBlank()) {
|
if (bootstrapToken != null && !bootstrapToken.isBlank()) {
|
||||||
envVars.put("CAMELEER_AUTH_TOKEN", bootstrapToken);
|
envVars.put("CAMELEER_AUTH_TOKEN", bootstrapToken);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ public final class ConfigMerger {
|
|||||||
stringVal(appConfig, envConfig, "routingDomain", global.routingDomain()),
|
stringVal(appConfig, envConfig, "routingDomain", global.routingDomain()),
|
||||||
stringVal(appConfig, envConfig, "serverUrl", global.serverUrl()),
|
stringVal(appConfig, envConfig, "serverUrl", global.serverUrl()),
|
||||||
intVal(appConfig, envConfig, "replicas", 1),
|
intVal(appConfig, envConfig, "replicas", 1),
|
||||||
stringVal(appConfig, envConfig, "deploymentStrategy", "blue-green")
|
stringVal(appConfig, envConfig, "deploymentStrategy", "blue-green"),
|
||||||
|
boolVal(appConfig, envConfig, "routeControlEnabled", true),
|
||||||
|
boolVal(appConfig, envConfig, "replayEnabled", true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ public record ResolvedContainerConfig(
|
|||||||
String routingDomain,
|
String routingDomain,
|
||||||
String serverUrl,
|
String serverUrl,
|
||||||
int replicas,
|
int replicas,
|
||||||
String deploymentStrategy
|
String deploymentStrategy,
|
||||||
|
boolean routeControlEnabled,
|
||||||
|
boolean replayEnabled
|
||||||
) {
|
) {
|
||||||
public long memoryLimitBytes() {
|
public long memoryLimitBytes() {
|
||||||
return (long) memoryLimitMb * 1024 * 1024;
|
return (long) memoryLimitMb * 1024 * 1024;
|
||||||
|
|||||||
Reference in New Issue
Block a user