Per-app writeable volumes for stateful tenants (read-only rootfs follow-up) #153
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #152.
Context
The runtime-hardening PR sets
read_only_rootfs=trueon every tenant container and mounts a 256m tmpfs at/tmp(rw, nosuid). This works for stateless apps (vanilla Camel-Kafka producers/consumers, REST APIs, integrations) — but breaks anything that writes durable state outside/tmp:/var/log/.../opt/app/...A 256m tmpfs is enough for transient JVM scratch but not enough for production state stores, and tmpfs is wiped on container restart anyway.
Proposal
Add
containerConfig.writeableVolumes: List<String>toResolvedContainerConfig/ConfigMerger:For each declared path, the orchestrator binds a Docker volume scoped to
(tenant, app, env, path)so:cameleer-{tenant}-{env}-{app}-{slug-of-path}.UI
AppConfigurationPage→ Resources tab → "Writeable volumes" list. Add path, remove path. Show resolved Docker volume name as read-only hint.Implementation surface
cameleer-server-core/src/main/java/com/cameleer/server/core/runtime/ResolvedContainerConfig.java— add fieldcameleer-server-core/src/main/java/com/cameleer/server/core/runtime/ConfigMerger.java— three-layer merge (global / env / app)cameleer-server-core/src/main/java/com/cameleer/server/core/runtime/ContainerRequest.java— add field, plumb throughcameleer-server-app/src/main/java/com/cameleer/server/app/runtime/DockerRuntimeOrchestrator.java—Volumebinds for each declared pathcameleer-server-app/src/main/java/com/cameleer/server/app/runtime/DeploymentExecutor.java— name resolution + ensure-volumeAppConfigurationPage.tsxresource tabAppService.deleteApp)Acceptance
writeableVolumes: [/tmp/kafka-streams]and survives a redeploy with state intact.