Template

Struct Template 

Source
pub struct Template {
Show 39 fields pub active_deadline_seconds: Option<String>, pub affinity: Option<Box<Affinity>>, pub archive_location: Option<Box<ArtifactLocation>>, pub automount_service_account_token: Option<bool>, pub container: Option<Box<Container>>, pub container_set: Option<Box<ContainerSetTemplate>>, pub daemon: Option<bool>, pub dag: Option<Box<DAGTemplate>>, pub data: Option<Box<Data>>, pub executor: Option<Box<ExecutorConfig>>, pub fail_fast: Option<bool>, pub host_aliases: Option<Vec<HostAlias>>, pub http: Option<Box<HTTP>>, pub init_containers: Option<Vec<UserContainer>>, pub inputs: Option<Box<Inputs>>, pub memoize: Option<Box<Memoize>>, pub metadata: Option<Box<Metadata>>, pub metrics: Option<Box<Metrics>>, pub name: Option<String>, pub node_selector: Option<HashMap<String, String>>, pub outputs: Option<Box<Outputs>>, pub parallelism: Option<i32>, pub plugin: Option<Value>, pub pod_spec_patch: Option<String>, pub priority: Option<i32>, pub priority_class_name: Option<String>, pub resource: Option<Box<ResourceTemplate>>, pub retry_strategy: Option<Box<RetryStrategy>>, pub scheduler_name: Option<String>, pub script: Option<Box<ScriptTemplate>>, pub security_context: Option<Box<PodSecurityContext>>, pub service_account_name: Option<String>, pub sidecars: Option<Vec<UserContainer>>, pub steps: Option<Vec<Vec<WorkflowStep>>>, pub suspend: Option<Box<SuspendTemplate>>, pub synchronization: Option<Box<Synchronization>>, pub timeout: Option<String>, pub tolerations: Option<Vec<Toleration>>, pub volumes: Option<Vec<Volume>>,
}
Expand description

Template is a reusable and composable unit of execution in a workflow.

Fields§

§active_deadline_seconds: Option<String>§affinity: Option<Box<Affinity>>§archive_location: Option<Box<ArtifactLocation>>§automount_service_account_token: Option<bool>

AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in pods. ServiceAccountName of ExecutorConfig must be specified if this value is false.

§container: Option<Box<Container>>§container_set: Option<Box<ContainerSetTemplate>>§daemon: Option<bool>

Daemon will allow a workflow to proceed to the next step so long as the container reaches readiness.

§dag: Option<Box<DAGTemplate>>§data: Option<Box<Data>>§executor: Option<Box<ExecutorConfig>>§fail_fast: Option<bool>

FailFast, if specified, will fail this template if any of its child pods has failed. This is useful for when this template is expanded with withItems, etc.

§host_aliases: Option<Vec<HostAlias>>

HostAliases is an optional list of hosts and IPs that will be injected into the pod spec.

§http: Option<Box<HTTP>>§init_containers: Option<Vec<UserContainer>>

InitContainers is a list of containers which run before the main container.

§inputs: Option<Box<Inputs>>§memoize: Option<Box<Memoize>>§metadata: Option<Box<Metadata>>§metrics: Option<Box<Metrics>>§name: Option<String>

Name is the name of the template

§node_selector: Option<HashMap<String, String>>

NodeSelector is a selector to schedule this step of the workflow to be run on the selected node(s). Overrides the selector set at the workflow level.

§outputs: Option<Box<Outputs>>§parallelism: Option<i32>

Parallelism limits the max total parallel pods that can execute at the same time within the boundaries of this template invocation. If additional steps/dag templates are invoked, the pods created by those templates will not be counted towards this total.

§plugin: Option<Value>

Plugin is an Object with exactly one key

§pod_spec_patch: Option<String>

PodSpecPatch holds strategic merge patch to apply against the pod spec.Allows parameterization of container fields which are not strings (e.g. resource limits).

§priority: Option<i32>

Priority to apply to workflow pods.

§priority_class_name: Option<String>

PriorityClassName to apply to workflow pods.

§resource: Option<Box<ResourceTemplate>>§retry_strategy: Option<Box<RetryStrategy>>§scheduler_name: Option<String>

If specified, the pod will be dispatched by specified scheduler. Or it will be dispatched by workflow scope scheduler if specified. If neither specified, the pod will be dispatched by default scheduler.

§script: Option<Box<ScriptTemplate>>§security_context: Option<Box<PodSecurityContext>>§service_account_name: Option<String>

ServiceAccountName to apply to workflow pods

§sidecars: Option<Vec<UserContainer>>

Sidecars is a list of containers which run alongside the main container. Sidecars are automatically killed when the main container completes

§steps: Option<Vec<Vec<WorkflowStep>>>

Steps define a series of sequential/parallel workflow steps

§suspend: Option<Box<SuspendTemplate>>§synchronization: Option<Box<Synchronization>>§timeout: Option<String>

Timeout allows to set the total node execution timeout duration counting from the node’s start time. This duration also includes time in which the node spends in Pending state. This duration may not be applied to Step or DAG templates.

§tolerations: Option<Vec<Toleration>>

Tolerations to apply to workflow pods.

§volumes: Option<Vec<Volume>>

Volumes is a list of volumes that can be mounted by containers in a template.

Implementations§

Source§

impl Template

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Clone for Template

Source§

fn clone(&self) -> Template

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Template

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Template

Source§

fn default() -> Template

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Template

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Template

Source§

fn eq(&self, other: &Template) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Template

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Template

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,