Skip to content

workloads

This page is generated from the same Go declarations the loader enforces, so it cannot drift from what ob validate accepts.

args · bind · build · command · compose · condition · container · context · cpus · cron · data_effect · dockerfile · domain · drain · driver · entrypoint · env · env_files · exec · extra_hosts · file · grace · health · host · hostname · http · image · init · interval · labels · logging · memory · middlewares · mode · name · needs · options · path · persistence · platform · port · protocol · provider · published_ports · pull · reference · registry · replicas · resources · retries · role · routes · schedule · scheme · signal · source · start_period · stdin_open · strategy · target · tcp · timezone · tls · tty · user · volumes · wait · when · within · working_dir

FieldTypeDefaultWhat it does
<name>.buildobjectBuild metadata for development. Production requires a resolved image supplied with —image. Also accepts a build context path.
<name>.build.argsmapBuild arguments supplied by the external build system.
<name>.build.contextstringRepository-relative build context. Expects a path inside the repository, with no control character or shell metacharacter.
<name>.build.dockerfilestringRepository-relative Dockerfile path. Expects a path inside the repository, with no control character or shell metacharacter.
<name>.build.platformstringTarget image platform for the external build.
<name>.build.targetstringNamed Dockerfile stage to build.
<name>.commandlistContainer command as a shell string or argument list. Also accepts a command line or argument list.
<name>.composestringExisting Compose service to adopt, as repository path#service. Expects a reference of the form path/to/compose.yaml#service.
<name>.data_effectnone · migration · destructive · unknownJob data impact used by rollback and abort gates.
<name>.domainstringDomain shorthand for one HTTPS route; requires port and cannot be combined with routes.
<name>.drainobjectSignal and timing used to remove a container from traffic before stopping it.
<name>.drain.gracestringMaximum graceful-shutdown time before forced termination. Expects a duration such as 30s, 5m, 1h30m or 14d.
<name>.drain.signalstringTERMSignal sent to begin graceful shutdown. Expects a signal name such as TERM or QUIT.
<name>.drain.waitstringTime allowed for the proxy to stop routing before shutdown begins. Expects a duration such as 30s, 5m, 1h30m or 14d.
<name>.entrypointlistContainer entrypoint as a string or argument list. Also accepts an entrypoint or argument list.
<name>.envmapLiteral container environment values. Managed-service credential variables cannot be overridden.
<name>.env_fileslistWorkload-specific ordered environment-file list. Replaces broader defaults when present.
<name>.env_files[].file *stringRepository-relative environment file path. Expects a path inside the repository, with no control character or shell metacharacter.
<name>.env_files[].providersopsDecryptor used before staging the file. The supported encrypted provider is sops.
<name>.extra_hostslistAdditional host-to-address entries added to the container.
<name>.healthobjectReadiness check used to gate rolling replacement. Also accepts an HTTP health path.
<name>.health.execHealth command as a shell string or direct argument list.
<name>.health.httpstringHTTP path probed inside the container. Expects a path beginning with /.
<name>.health.intervalstringDelay between container health probes. Expects a duration such as 30s, 5m, 1h30m or 14d.
<name>.health.portintegerContainer port probed by HTTP or TCP health checks.
<name>.health.retriesintegerConsecutive failed probes before the container is unhealthy.
<name>.health.start_periodstringStartup grace period before failed probes count. Expects a duration such as 30s, 5m, 1h30m or 14d.
<name>.health.tcpbooleanfalseProbe the configured port by opening a TCP connection.
<name>.health.withinstringMaximum time a rollout waits for readiness. Expects a duration such as 30s, 5m, 1h30m or 14d.
<name>.hostnamestringHostname assigned inside the workload container.
<name>.imageobjectContainer image source, written as a reference string or an object. Also accepts an image reference.
<name>.image.platformstringPlatform selected when the image is multi-platform.
<name>.image.pullalways · missing · nevermissingImage pull policy: missing, always, or never.
<name>.image.referencestringComplete container image reference, optionally tagged or digest-pinned. Expects a registry reference such as nginx:1.27 or ghcr.io/acme/app@sha256:….
<name>.image.registrystringOptional registry label retained in canonical configuration. Current authentication uses every top-level registries entry; this field does not select a login.
<name>.initbooleanRun a minimal init process as PID 1 inside the container.
<name>.labelsmapAdditional container labels outside namespaces reserved by Onebox and the proxy.
<name>.loggingobjectContainer logging driver and driver-specific options.
<name>.logging.driverstringContainer runtime logging driver. Expects a log driver name such as local, json-file or an org/plugin:tag.
<name>.logging.optionsmapDriver-specific logging options passed to the container runtime.
<name>.needslistWorkload or supporting-service prerequisites and optional connection-variable mappings.
<name>.needs[].conditionstarted · healthy · completedPrerequisite condition: started, healthy, or completed.
<name>.needs[].envmapMaps application environment-variable names to service connection parts such as host, port, user, password, database, or url.
<name>.needs[].namestringName of a workload or supporting service that must start first. Expects lower-case letters, digits and hyphens, starting with a letter, at most 40 characters.
<name>.persistenceobjectDeclares whether this workload holds data that must outlive releases.
<name>.persistence.modedurable · ephemeral · externaldurableData lifetime: durable, ephemeral, or external.
<name>.portintegerContainer port used with domain shorthand and as the default HTTP health port.
<name>.published_portslistHost ports published outside the proxy. They bind to loopback by default. A rolling workload cannot publish one, because two replicas cannot hold the same host port during a roll: set strategy: recreate, or route through the proxy instead.
<name>.published_ports[].bindstring127.0.0.1Host address on which the published port listens.
<name>.published_ports[].containerintegerPort receiving traffic inside the container.
<name>.published_ports[].hostintegerPort exposed on the host.
<name>.published_ports[].protocoltcp · udptcpPublished transport protocol: tcp or udp.
<name>.replicasinteger1Desired number of long-running workload containers.
<name>.resourcesobjectContainer memory and CPU limits.
<name>.resources.cpusstringContainer CPU limit expressed as a positive decimal count. Expects a number of CPUs such as 0.5 or 2.
<name>.resources.memorystringContainer memory limit. Expects a size such as 512MB or 1.5GB.
<name>.roleapplication · worker · daemon · jobLifecycle role: application, worker, daemon, or job.
<name>.routeslistIngress routes exposed by this workload.
<name>.routes[].domainstringDNS name matched by the proxy.
<name>.routes[].entrypointstringwebsecureNamed proxy listener used for the route.
<name>.routes[].middlewareslistOrdered provider-qualified middleware references applied to this route.
<name>.routes[].pathstring/URL path prefix matched by an HTTP route. Expects a path beginning with /.
<name>.routes[].portintegerContainer port receiving routed traffic.
<name>.routes[].protocolhttp · tcphttpRouting protocol: http, tcp, or udp.
<name>.routes[].schemehttp · https · h2chttpBackend connection scheme: http, https, h2c, tcp, or udp.
<name>.routes[].tlsterminate · passthrough · noneterminateTLS handling: terminate, passthrough, or none.
<name>.scheduleobjectHost-resident recurring schedule for a job.
<name>.schedule.cronstringFive-field cron schedule translated to a host timer. Expects five cron fields.
<name>.schedule.timezonestringUTCIANA timezone used to interpret the cron schedule. Expects an IANA zone name such as UTC or Europe/Berlin.
<name>.stdin_openbooleanKeep standard input open for the container.
<name>.strategyrolling · recreateRelease strategy. Defaults to rolling only for an application workload with health; all other workloads default to recreate.
<name>.ttybooleanAllocate a pseudo-TTY for the container.
<name>.userstringUser or UID used to run the container process.
<name>.volumeslistManaged named volumes or repository bind mounts.
<name>.volumes[].moderw · rorwMount access mode: rw or ro.
<name>.volumes[].namestringStable logical name of a Onebox-managed volume. Expects lower-case letters, digits and hyphens, starting with a letter, at most 40 characters.
<name>.volumes[].pathstringAbsolute container path where the volume or bind mount is attached. Expects an absolute path with no control character or shell metacharacter.
<name>.volumes[].sourcestringRepository-relative source path of a bind mount.
<name>.whenpre_release · post_release · manualmanualWhen a job runs: manual, pre_release, or post_release.
<name>.working_dirstringAbsolute working directory for the container process. Expects an absolute path with no control character or shell metacharacter.

* marks a field that is required within its own object.