Container Tool (Canonical v10)
The container tool runs a script in an isolated Kubernetes Job. Use it as a pipeline task (kind: container) inside step.tool.
Canonical reminders:
- Use
whenonly (no legacyeval/expr/case). - Task control flow belongs to
task.spec.policy.rules(retry|jump|break|fail|continue). - Step routing belongs to
step.nextrouter arcs.
Basic usage
- step: run_job
tool:
- job:
kind: container
runtime:
provider: kubernetes
image: python:3.11-slim
namespace: noetl
timeoutSeconds: 900
env:
API_URL: "{{ workload.api_url }}"
script:
uri: gs://my-bucket/scripts/job.sh
source:
type: gcs
auth: gcp_service_account
spec:
policy:
rules:
- when: "{{ outcome.status == 'error' }}"
then: { do: fail }
- else:
then: { do: break }
The container tool uses the canonical
scriptdescriptor (uri+source). Seedocumentation/docs/reference/script_execution_v2.md.
Common fields (conceptual)
| Field | Meaning |
|---|---|
runtime.image | Container image |
runtime.namespace | Kubernetes namespace |
runtime.command / runtime.args | Command override (default runs the resolved script) |
runtime.env | Environment variables (templated) |
runtime.timeoutSeconds | Job deadline |
runtime.serviceAccountName | ServiceAccount name |
runtime.cleanup | Whether to clean up Job/ConfigMap artifacts |
runtime.files[] | Additional file descriptors to deliver (same shape as script) |
script | Script descriptor (required) |
See also
- Script loading / script jobs:
documentation/docs/reference/script_execution_v2.md - Result storage (reference-first):
documentation/docs/reference/result_storage_canonical_v10.md