pub struct Template {Show 19 fields
pub name: String,
pub metadata: Option<ObjectMeta>,
pub inputs: Option<Inputs>,
pub outputs: Option<Outputs>,
pub container: Option<Container>,
pub dag: Option<DagTemplate>,
pub daemon: Option<bool>,
pub volumes: Vec<Volume>,
pub service_account_name: String,
pub node_selector: BTreeMap<String, String>,
pub steps: Vec<Vec<DagTask>>,
pub retry_strategy: Option<RetryStrategy>,
pub timeout: String,
pub active_deadline_seconds: Option<i32>,
pub synchronization: Option<Synchronization>,
pub tolerations: Vec<Toleration>,
pub affinity: Option<Value>,
pub pod_spec_patch: Option<String>,
pub parallelism: Option<i64>,
}Fields§
§name: String§metadata: Option<ObjectMeta>Argo Template.metadata — annotations + labels on the
pod/dag/steps template. Optional, skip-serialized when
empty, so existing goldens stay byte-identical for
templates that don’t use the annotations = {…} attr.
inputs: Option<Inputs>§outputs: Option<Outputs>§container: Option<Container>§dag: Option<DagTemplate>§daemon: Option<bool>#[container(daemon)] → Argo Template.daemon: true. The pod
is treated as long-running: the workflow proceeds to dependents
as soon as the container reaches READINESS (not completion), and
Argo terminates the daemon when its boundary node finishes.
Container/script templates only (no-op on dag/steps). Two Argo
gotchas the user must know: a daemon pod that exits Succeeded
is marked FAILED (daemons are expected to run indefinitely), and
retryStrategy only covers the startup phase (failures after
readiness are ignored). athena has no readinessProbe attr — use
pod_spec_patch to add one if Ready timing matters.
volumes: Vec<Volume>§service_account_name: StringPer-template SA override (Argo runs the pod as this).
node_selector: BTreeMap<String, String>Template-level pod scheduling (container templates).
steps: Vec<Vec<DagTask>>#[workflow(steps)] body: Argo steps is a list of lists —
inner runs in parallel, outer sequentially. Plain serde nests
Vec<Vec<_>> natively (no proto wrapper needed).
retry_strategy: Option<RetryStrategy>Template-level retry policy (#[container/workflow(retry(..))]).
timeout: StringTemplate-level timeout duration (#[…(timeout = "5m")]).
active_deadline_seconds: Option<i32>Template-level deadline (#[…(active_deadline = …)]) →
Argo Template.activeDeadlineSeconds (per-pod; applies even
when this template is templateRef’d — NOT root-only).
synchronization: Option<Synchronization>Template-level Synchronization — per-step mutexes
(#[…(mutexes = [{ name = … }])]). Holder key is
<ns>/<wf>/<node>, so within ONE run two nodes
referencing the same template-level mutex serialize, AND
nodes across separate runs (same name + ns) also serialize.
Both inputs.parameters and workflow.parameters
substitution resolve at this scope (no nodeSelector-style
boundary-copy footgun — proven v4.0.5 2026-05-25).
tolerations: Vec<Toleration>Template-level tolerations on a container WT, from
#[container(tolerations = [...])]. Substitution at this
scope is safe for the template’s own pod (the pod renders
from the substituted template); empirically verified on
v4.0.5 2026-05-26.
affinity: Option<Value>Template-level pod affinity on a container WT, from
#[container(affinity = "...")]. Opaque YAML/JSON value
(athena does NOT model apiv1.Affinity by design — use
pod_spec_patch as the all-purpose alternative).
pod_spec_patch: Option<String>Template-level strategic-merge patch applied to this
template’s pod after Argo renders it. From
#[container(pod_spec_patch = "...")]. Substituted at
pod-creation time, so {{inputs.parameters.X}} resolves
(proven v4.0.5 2026-05-26 - the patch goes through the
same processPodSpecPatch → ProcessArgs pass that
renders the substituted template, so the leaf-pod inherits
the resolved value without the nodeSelector-style
boundary-copy footgun).
parallelism: Option<i64>Template-level pod-concurrency cap on this dag/steps. From
#[workflow(parallelism = N)]. Caps concurrent children
scheduled under THIS template invocation only — pods
created by nested templates don’t count. Argo’s CRD
enforces +kubebuilder:validation:Minimum=1.