Common types
Shared configuration types referenced from the manifest sections and resource kinds above.
Command
Override for the image default CMD.
Two forms are accepted in the manifest YAML:
- A single string is interpreted shell-style, equivalent to wrapping
the value in
sh -c "...". Convenient for one-liners. - An array of strings is passed directly to the container runtime as an argument vector, giving precise control over quoting and whitespace.
Either form becomes the container Cmd. The image ENTRYPOINT is
preserved: it is never overridden, so an image declaring
ENTRYPOINT ["/usr/local/bin/app"] runs that binary with this value
appended as its arguments. Against such an image, a startup shim
written as sh -c "..." is not executed as a command of its own; it
reaches the entrypoint binary as positional arguments, which most
argument parsers reject. Only images whose entrypoint is a shell, or
which declare no entrypoint at all, run this value directly.
Used in the command field of [crate::ContainerConfig] and
[crate::DockerfileConfig].
ComposeExport
Global overrides for the docker-compose export target.
Nested under [ExportConfig::compose]. All resource keys in resources
must reference a name declared in [crate::Manifest::resources], enforced by
[crate::Manifest::validate].
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
resources | map of ComposeResourceExport | no | Per-resource overrides, keyed by manifest resource name. Resources not listed here receive the default behaviour (included, standard image naming). |
ComposeResourceExport
Per-resource overrides for the docker-compose export target.
Used as the value type in [ComposeExport::resources].
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | no | Whether this resource is included in the export. None or Some(true) includes the resource. Some(false) omits it. |
Healthcheck
Per-resource healthcheck configuration.
Field semantics mirror Docker Compose so that existing knowledge
transfers directly. Duration fields (interval, timeout,
start_period) accept strings like "5s", "200ms", or "2m" and
are validated by [crate::Manifest::validate].
A Healthcheck is embedded in [crate::PostgresConfig], [crate::RedisConfig],
[crate::ContainerConfig], and [crate::DockerfileConfig] via their healthcheck
field, and is also accessible through [crate::ResourceKind::healthcheck].
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
interval | string | no | "5s" | Time between consecutive check executions. Default "5s". Accepted suffixes: ns, us, ms, s, m, h. |
retries | integer | no | 5 | Number of consecutive failures needed to declare the resource unhealthy. Default 5. |
start_period | string | no | "5s" | Grace period at startup during which check failures are not counted toward retries. Default "5s". |
test | array of string | yes | Command to run. The first element must be "CMD" or "CMD-SHELL". Cannot be empty (enforced by [crate::Manifest::validate]). | |
timeout | string | no | "3s" | Maximum duration a single check execution may take before the runtime treats it as failed. Default "3s". |
HelmExport
Global overrides for the Helm chart export target.
Nested under [ExportConfig::helm]. The chart name and version default
to the project name and version respectively, resolved by
lightshuttle-export during lowering.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
chart_name | string | no | Chart name. Defaults to the project name during lowering. | |
chart_version | string | no | Chart version (SemVer string). Defaults to the project version when set, otherwise "0.1.0". | |
replicas | integer | no | Default replica count exposed via the generated chart’s values.yaml. | |
resources | map of HelmResourceExport | no | Per-resource overrides, keyed by manifest resource name. |
HelmResourceExport
Per-resource overrides for the Helm chart export target.
Used as the value type in [HelmExport::resources].
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | no | Whether this resource is included in the chart. None or Some(true) includes the resource. Some(false) omits it. | |
replicas | integer | no | Replica count override for this resource, taking precedence over [HelmExport::replicas]. |
ImagePullPolicy
Kubernetes image pull policy, used in [KubernetesExport] and
[KubernetesResourceExport].
Maps directly to the imagePullPolicy field in a Kubernetes
Container spec.
KubernetesExport
Global overrides for the raw Kubernetes manifests export target.
Nested under [ExportConfig::kubernetes]. Defaults (namespace, replica
count, pull policy) are resolved by lightshuttle-export during
lowering.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
image_pull_policy | ImagePullPolicy | no | Default image pull policy applied to every resource. See [ImagePullPolicy] for accepted values. Defaults to [ImagePullPolicy::IfNotPresent]. | |
namespace | string | no | Target Kubernetes namespace. Defaults to the project name when absent. | |
replicas | integer | no | Default replica count for every resource that supports it. | |
resources | map of KubernetesResourceExport | no | Per-resource overrides, keyed by manifest resource name. |
KubernetesResourceExport
Per-resource overrides for the Kubernetes manifests export target.
Used as the value type in [KubernetesExport::resources].
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | no | Whether this resource is included in the export. None or Some(true) includes the resource. Some(false) omits it. | |
image_pull_policy | ImagePullPolicy | no | Image pull policy override for this specific resource, taking precedence over [KubernetesExport::image_pull_policy]. | |
replicas | integer | no | Replica count override for this specific resource, taking precedence over [KubernetesExport::replicas]. |
OtelConfig
Toggle for the bundled OpenTelemetry collector.
Nested under [ObservabilityConfig::otel] in the manifest.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | no | Whether the bundled OpenTelemetry collector is active. - None or Some(true): the collector starts and OTLP environment variables are injected into every container. - Some(false): lightshuttle up skips the collector and does not inject any OTLP variables. |
PortMapping
Port mapping for a container resource.
Two forms are accepted in the manifest:
- Integer short form: the runtime mirrors the container port on an
identical host port. Example:
8080maps0.0.0.0:8080 -> 8080. - String full form: supports the
"host:container"and"bind_addr:host:container"syntaxes understood by the container runtime. Example:"127.0.0.1:9090:9090".
Used in the ports field of [crate::ContainerConfig] and
[crate::DockerfileConfig].
Volume
Volume persistence specification for a managed resource.
Three forms are accepted in the manifest:
true(default): the runtime provisions an auto-named volume.false: no volume; the container data directory is ephemeral and lost whenlightshuttle downremoves the container.- A string such as
"my-db-data": an explicitly named volume, shared across projects or preserved with a predictable name.
Used in the volume field of [crate::PostgresConfig] and [crate::RedisConfig].