Core concepts
Core concepts specific to Worker resources.
Replicas
replicas controls how many Worker instances DataOS maintains. Increase the replica count when the Worker logic can safely run in parallel.
spec:
replicas: 1High availability
highAvailabilityConfig defines how multiple replicas of the Worker are distributed across infrastructure boundaries such as hostnames, zones, or regions. This ensures that if one replica becomes unavailable due to an issue in a specific part of the infrastructure, the other replicas continue to operate independently.
spec:
compute: karpenter-compute
highAvailabilityConfig:
mode: preferred
# level: hostname
level: zone
# level: region
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
executionMode: runnablelevelspecifies the level across which replicas should be distributed,hostname,zone, orregion, determining the intended placement separation. The actual distribution still depends onmode.modespecifies how strictly that separation is applied. Withmode: preferred, the system tries to place each replica on a different hostname, zone, or region as specified bylevel, but if not enough distinct units are available, it still proceeds and places replicas together. Withmode: required, replicas are placed only if the separation defined bylevelcan be exactly met — if not enough distinct hostnames, zones, or regions are available, the Worker fails.
Execution mode
executionMode defines how the Worker is executed by the runtime. Use default unless the Worker stack or platform guidance requires another mode.
Resources
Use resources.requests and resources.limits to control CPU and memory allocation for the Worker runtime.
Stack and stackSpec
stack selects the runtime stack. stackSpec contains stack-specific configuration. For the container stack, provide the container image, command, and arguments.
Common Worker stacks include:
containerfor custom long-running containersbentofor stream processing pipelinesfastfunfor sink-style background runtimes
The fields under stackSpec depend on the selected stack.
Projections
Use use.projection when the Worker needs environment variables, Secrets, or files at runtime.
For projection syntax, template engines, data sources, and troubleshooting, see Projections.
Storage
Workers can use inline disk storage or mount existing Volume Resources when a background process needs local or persistent files.
Use
diskwhen storage belongs to the Worker lifecycle.Use
use.volumeswhen data must persist independently of the Worker.
Last updated
Was this helpful?