pub struct WorkflowSpec {Show 18 fields
pub entrypoint: String,
pub templates: Vec<Template>,
pub arguments: Option<Arguments>,
pub workflow_template_ref: Option<WorkflowTemplateRef>,
pub service_account_name: String,
pub node_selector: BTreeMap<String, String>,
pub hooks: BTreeMap<String, LifecycleHook>,
pub ttl_strategy: Option<TtlStrategy>,
pub pod_gc: Option<PodGc>,
pub active_deadline_seconds: Option<i64>,
pub synchronization: Option<Synchronization>,
pub priority: Option<i32>,
pub tolerations: Vec<Toleration>,
pub affinity: Option<Value>,
pub pod_spec_patch: Option<String>,
pub image_pull_secrets: Vec<LocalObjectReference>,
pub parallelism: Option<i64>,
pub volume_claim_templates: Vec<PersistentVolumeClaim>,
}Fields§
§entrypoint: String§templates: Vec<Template>§arguments: Option<Arguments>§workflow_template_ref: Option<WorkflowTemplateRef>Set on a runnable Workflow that just invokes a WorkflowTemplate.
service_account_name: String§node_selector: BTreeMap<String, String>Root-scoped pod scheduling for the submitted Workflow
(Argo applies it to every pod). Only cargo athena submit --node-selector sets this; emit never does (skip-empty ⇒
existing goldens unaffected).
hooks: BTreeMap<String, LifecycleHook>Whole-workflow lifecycle hooks. Key exit is the exit handler
(runs once when the Workflow finishes). We use this (with a
templateRef) rather than the legacy spec.onExit string,
which only resolves a local template name — unusable across
the one-WT-per-template wormhole.
ttl_strategy: Option<TtlStrategy>Workflow-scoped TTL GC (#[…(ttl(..))]).
pod_gc: Option<PodGc>Workflow-scoped pod GC (#[…(pod_gc(strategy=..))]). camelCase
of pod_gc is podGc, but Argo’s field is podGC — the
argo! macro forwards this explicit rename ahead of its
rename_all, so it wins.
active_deadline_seconds: Option<i64>Root-scoped Argo WorkflowSpec.activeDeadlineSeconds — the
genuine whole-workflow runtime cap, from
#[…(active_deadline_if_root=..)]. (int64 in Argo;
camelCase of the field name already matches.) skip-empty ⇒
existing goldens stay byte-identical.
synchronization: Option<Synchronization>Root-scoped Synchronization — workflow-level mutexes
(#[…(mutexes_if_root = [{ name = … }])]). Argo’s sync
manager keys on <ns>/Mutex/<name> globally per controller,
so two SEPARATE Workflow runs (not just templateRef’d
sub-workflows in one run) contend on the same name —
empirically verified on v4.0.5, holder key <ns>/<wf>.
priority: Option<i32>Workflow priority (int32). The Argo controller schedules
higher-priority workflows first when its parallelism limit
is hit. Today only cargo athena submit --priority sets
this; emit never does (skip-empty ⇒ existing goldens stay
byte-identical). A future #[workflow(priority_if_root=N)]
would land here too (spec-scoped, hence the _if_root
convention).
tolerations: Vec<Toleration>Root-scoped tolerations (3rd tier of Argo’s tmpl → boundary → wfSpec pod-scheduling lookup). From
#[…(tolerations_if_root = [...])]. Applies to every pod
in the run that doesn’t have its own template- or
boundary-level override (same cascade as node_selector).
affinity: Option<Value>Root-scoped pod affinity (3rd tier). Opaque YAML/JSON value
from #[…(affinity_if_root = "...")]; athena does NOT model
the deeply-nested apiv1.Affinity schema by design.
pod_spec_patch: Option<String>Root-scoped strategic-merge patch applied to every pod in
the run after Argo renders the podSpec. From
#[workflow(pod_spec_patch_if_root = "...")]. Substituted at
pod-creation time (workflow/controller/workflowpod.go:89
processPodSpecPatch → ProcessArgs) so
{{workflow.parameters.X}} resolves; per-template
Template.pod_spec_patch is concat’d onto this one. The
universal escape hatch for any podSpec field athena hasn’t
lifted to a first-class attr.
image_pull_secrets: Vec<LocalObjectReference>Root-only WorkflowSpec.ImagePullSecrets — Secret references
the kubelet uses to authenticate against private image
registries when pulling each pod’s image. From
#[…(image_pull_secrets_if_root = ["regcred", ...])].
K8s/Argo expose this only at workflow scope (no
per-template knob); per-container needs go through
pod_spec_patch. skip-empty ⇒ existing goldens stay
byte-identical.
parallelism: Option<i64>Root-scoped pod-concurrency cap. From
#[workflow(parallelism_if_root = N)]. Argo’s CRD enforces
+kubebuilder:validation:Minimum=1 so the macro rejects
<= 0 at compile time (would otherwise be rejected by the
API server at submit anyway).
volume_claim_templates: Vec<PersistentVolumeClaim>PVCs Argo creates per workflow run and deletes when it
finishes. One entry per #[ephemeral_pvc] type reachable
from the submitted root. Each pod mounts them via
claimName: <metadata.name>. Root-only by Argo’s design
(only the submitted Workflow’s spec is honored).
Trait Implementations§
Source§impl Clone for WorkflowSpec
impl Clone for WorkflowSpec
Source§fn clone(&self) -> WorkflowSpec
fn clone(&self) -> WorkflowSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more