Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArgoDAGTask" /> class.
 /// </summary>
 /// <param name="arguments">Arguments are the parameter and artifact arguments to the template.</param>
 /// <param name="continueOn">ContinueOn makes argo to proceed with the following step even if this step fails. Errors and Failed states can be specified.</param>
 /// <param name="dependencies">Dependencies are name of other targets which this depends on.</param>
 /// <param name="name">Name is the name of the target (required).</param>
 /// <param name="template">Name of template to execute (required).</param>
 /// <param name="templateRef">TemplateRef is the reference to the template resource to execute..</param>
 /// <param name="when">When is an expression in which the task should conditionally execute.</param>
 /// <param name="withItems">WithItems expands a task into multiple parallel tasks from the items in the list.</param>
 /// <param name="withParam">WithParam expands a task into multiple parallel tasks from the value in the parameter, which is expected to be a JSON list..</param>
 /// <param name="withSequence">WithSequence expands a task into a numeric sequence.</param>
 public ArgoDAGTask(ArgoArguments arguments = default(ArgoArguments), ArgoContinueOn continueOn = default(ArgoContinueOn), List <string> dependencies = default(List <string>), string name = default(string), string template = default(string), ArgoTemplateRef templateRef = default(ArgoTemplateRef), string when = default(string), List <ArgoItem> withItems = default(List <ArgoItem>), string withParam = default(string), ArgoSequence withSequence = default(ArgoSequence))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for ArgoDAGTask and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "template" is required (not null)
     if (template == null)
     {
         throw new InvalidDataException("template is a required property for ArgoDAGTask and cannot be null");
     }
     else
     {
         this.Template = template;
     }
     this.Arguments    = arguments;
     this.ContinueOn   = continueOn;
     this.Dependencies = dependencies;
     this.TemplateRef  = templateRef;
     this.When         = when;
     this.WithItems    = withItems;
     this.WithParam    = withParam;
     this.WithSequence = withSequence;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArgoWorkflowStep" /> class.
 /// </summary>
 /// <param name="arguments">Arguments hold arguments to the template.</param>
 /// <param name="continueOn">ContinueOn makes argo to proceed with the following step even if this step fails. Errors and Failed states can be specified.</param>
 /// <param name="name">Name of the step.</param>
 /// <param name="template">Template is the name of the template to execute as the step.</param>
 /// <param name="templateRef">TemplateRef is the reference to the template resource to execute as the step..</param>
 /// <param name="when">When is an expression in which the step should conditionally execute.</param>
 /// <param name="withItems">WithItems expands a step into multiple parallel steps from the items in the list.</param>
 /// <param name="withParam">WithParam expands a step into multiple parallel steps from the value in the parameter, which is expected to be a JSON list..</param>
 /// <param name="withSequence">WithSequence expands a step into a numeric sequence.</param>
 public ArgoWorkflowStep(ArgoArguments arguments = default(ArgoArguments), ArgoContinueOn continueOn = default(ArgoContinueOn), string name = default(string), string template = default(string), ArgoTemplateRef templateRef = default(ArgoTemplateRef), string when = default(string), List <ArgoItem> withItems = default(List <ArgoItem>), string withParam = default(string), ArgoSequence withSequence = default(ArgoSequence))
 {
     this.Arguments    = arguments;
     this.ContinueOn   = continueOn;
     this.Name         = name;
     this.Template     = template;
     this.TemplateRef  = templateRef;
     this.When         = when;
     this.WithItems    = withItems;
     this.WithParam    = withParam;
     this.WithSequence = withSequence;
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArgoTemplate" /> class.
 /// </summary>
 /// <param name="activeDeadlineSeconds">Optional duration in seconds relative to the StartTime that the pod may be active on a node before the system actively tries to terminate the pod; value must be positive integer This field is only applicable to container and script templates..</param>
 /// <param name="affinity">Affinity sets the pod&#39;s scheduling constraints Overrides the affinity set at the workflow level (if any).</param>
 /// <param name="archiveLocation">Location in which all files related to the step will be stored (logs, artifacts, etc...). Can be overridden by individual items in Outputs. If omitted, will use the default artifact repository location configured in the controller, appended with the &lt;workflowname&gt;/&lt;nodename&gt; in the key..</param>
 /// <param name="arguments">Arguments hold arguments to the template..</param>
 /// <param name="container">Container is the main container image to run in the pod.</param>
 /// <param name="daemon">Deamon will allow a workflow to proceed to the next step so long as the container reaches readiness.</param>
 /// <param name="dag">DAG template subtype which runs a DAG.</param>
 /// <param name="hostAliases">HostAliases is an optional list of hosts and IPs that will be injected into the pod spec.</param>
 /// <param name="initContainers">InitContainers is a list of containers which run before the main container..</param>
 /// <param name="inputs">Inputs describe what inputs parameters and artifacts are supplied to this template.</param>
 /// <param name="metadata">Metdata sets the pods&#39;s metadata, i.e. annotations and labels.</param>
 /// <param name="name">Name is the name of the template (required).</param>
 /// <param name="nodeSelector">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..</param>
 /// <param name="outputs">Outputs describe the parameters and artifacts that this template produces.</param>
 /// <param name="parallelism">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..</param>
 /// <param name="priority">Priority to apply to workflow pods..</param>
 /// <param name="priorityClassName">PriorityClassName to apply to workflow pods..</param>
 /// <param name="resource">Resource template subtype which can run k8s resources.</param>
 /// <param name="retryStrategy">RetryStrategy describes how to retry a template when it fails.</param>
 /// <param name="schedulerName">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..</param>
 /// <param name="script">Script runs a portion of code against an interpreter.</param>
 /// <param name="securityContext">SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty.  See type description for default values of each field..</param>
 /// <param name="serviceAccountName">ServiceAccountName to apply to workflow pods.</param>
 /// <param name="sidecars">Sidecars is a list of containers which run alongside the main container Sidecars are automatically killed when the main container completes.</param>
 /// <param name="steps">Steps define a series of sequential/parallel workflow steps.</param>
 /// <param name="suspend">Suspend template subtype which can suspend a workflow when reaching the step.</param>
 /// <param name="template">Template is the name of the template which is used as the base of this template..</param>
 /// <param name="templateRef">TemplateRef is the reference to the template resource which is used as the base of this template..</param>
 /// <param name="tolerations">Tolerations to apply to workflow pods..</param>
 /// <param name="volumes">Volumes is a list of volumes that can be mounted by containers in a template..</param>
 public ArgoTemplate(long?activeDeadlineSeconds = default(long?), k8s.Models.V1Affinity affinity = default(k8s.Models.V1Affinity), ArgoArtifactLocation archiveLocation = default(ArgoArtifactLocation), ArgoArguments arguments = default(ArgoArguments), k8s.Models.V1Container container = default(k8s.Models.V1Container), bool?daemon = default(bool?), ArgoDAGTemplate dag = default(ArgoDAGTemplate), List <k8s.Models.V1HostAlias> hostAliases = default(List <k8s.Models.V1HostAlias>), List <ArgoUserContainer> initContainers = default(List <ArgoUserContainer>), ArgoInputs inputs = default(ArgoInputs), ArgoMetadata metadata = default(ArgoMetadata), string name = default(string), Dictionary <string, string> nodeSelector = default(Dictionary <string, string>), ArgoOutputs outputs = default(ArgoOutputs), long?parallelism = default(long?), int?priority = default(int?), string priorityClassName = default(string), ArgoResourceTemplate resource = default(ArgoResourceTemplate), ArgoRetryStrategy retryStrategy = default(ArgoRetryStrategy), string schedulerName = default(string), ArgoScriptTemplate script = default(ArgoScriptTemplate), k8s.Models.V1PodSecurityContext securityContext = default(k8s.Models.V1PodSecurityContext), string serviceAccountName = default(string), List <ArgoUserContainer> sidecars = default(List <ArgoUserContainer>), List <List <ArgoWorkflowStep> > steps = default(List <List <ArgoWorkflowStep> >), ArgoSuspendTemplate suspend = default(ArgoSuspendTemplate), string template = default(string), ArgoTemplateRef templateRef = default(ArgoTemplateRef), List <k8s.Models.V1Toleration> tolerations = default(List <k8s.Models.V1Toleration>), List <k8s.Models.V1Volume> volumes = default(List <k8s.Models.V1Volume>))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for ArgoTemplate and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     this.ActiveDeadlineSeconds = activeDeadlineSeconds;
     this.Affinity           = affinity;
     this.ArchiveLocation    = archiveLocation;
     this.Arguments          = arguments;
     this.Container          = container;
     this.Daemon             = daemon;
     this.Dag                = dag;
     this.HostAliases        = hostAliases;
     this.InitContainers     = initContainers;
     this.Inputs             = inputs;
     this.Metadata           = metadata;
     this.NodeSelector       = nodeSelector;
     this.Outputs            = outputs;
     this.Parallelism        = parallelism;
     this.Priority           = priority;
     this.PriorityClassName  = priorityClassName;
     this.Resource           = resource;
     this.RetryStrategy      = retryStrategy;
     this.SchedulerName      = schedulerName;
     this.Script             = script;
     this.SecurityContext    = securityContext;
     this.ServiceAccountName = serviceAccountName;
     this.Sidecars           = sidecars;
     this.Steps              = steps;
     this.Suspend            = suspend;
     this.Template           = template;
     this.TemplateRef        = templateRef;
     this.Tolerations        = tolerations;
     this.Volumes            = volumes;
 }