Container Management
Overview
gobrave uses a unified container management model for interactive apps and workflow runtime tasks.
Runtime Backends
Configured by container.runtime:
dockerk8sk3s
Runtime resolution is centralized in the container runtime registry.
Main Entities
- Container image: image metadata and pull policy
- Container template: reusable launch definition
- App session: user-facing running environment based on template
- Container instance: runtime lifecycle state record
- Outbox event: durable async lifecycle request
Core API Groups
Image And Template
/container/image/*/container/template/*
App Session Lifecycle
/container/app-session/create/container/app-session/start/container/app-session/stop/container/app-session/delete
Runtime Monitoring
/container/runtime/monitoring/list/container/queue/status/container/outbox/list-by-page
Lifecycle Model
Typical flow:
- Create session from template.
- Resolve runtime backend and create runtime workload.
- Persist runtime ID and mark container instance state.
- Monitor runtime events (
started,failed,exited,deleted). - Transition state and apply cleanup policy.
Queue And Concurrency Controls
Container creation is bounded by:
container.create_queue_max_concurrencycontainer.create_queue_max_pending
These limits protect runtime resources during burst load.
Cleanup Policies
For DAG-owned containers, cleanup behavior can be tuned with:
container.delete_container_on_node_successcontainer.dag_node_cleanup_on_failedcontainer.dag_node_cleanup_on_dag_finished
Operational Recommendations
- Keep runtime monitoring enabled and observable.
- Use conservative queue concurrency in shared clusters.
- Align cleanup policy with debugging needs and storage cost.
- For Kubernetes mode, combine this doc with
/docs/k8s-runtime-architecture.