Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArgoWorkflowTemplateSpec" /> class.
 /// </summary>
 /// <param name="arguments">Arguments hold arguments to the template..</param>
 /// <param name="templates">Templates is a list of workflow templates. (required).</param>
 public ArgoWorkflowTemplateSpec(ArgoArguments arguments = default(ArgoArguments), List <ArgoTemplate> templates = default(List <ArgoTemplate>))
 {
     // to ensure "templates" is required (not null)
     if (templates == null)
     {
         throw new InvalidDataException("templates is a required property for ArgoWorkflowTemplateSpec and cannot be null");
     }
     else
     {
         this.Templates = templates;
     }
     this.Arguments = arguments;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArgoWorkflowSpec" /> class.
 /// </summary>
 /// <param name="activeDeadlineSeconds">Optional duration in seconds relative to the workflow start time which the workflow is allowed to run before the controller terminates the workflow. A value of zero is used to terminate a Running workflow.</param>
 /// <param name="affinity">Affinity sets the scheduling constraints for all pods in the workflow. Can be overridden by an affinity specified in the template.</param>
 /// <param name="arguments">Arguments contain the parameters and artifacts sent to the workflow entrypoint Parameters are referencable globally using the &#39;workflow&#39; variable prefix. e.g. {{workflow.parameters.myparam}}.</param>
 /// <param name="artifactRepositoryRef">ArtifactRepositoryRef specifies the configMap name and key containing the artifact repository config..</param>
 /// <param name="dnsConfig">PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy..</param>
 /// <param name="dnsPolicy">Set DNS policy for the pod. Defaults to \&quot;ClusterFirst\&quot;. Valid values are &#39;ClusterFirstWithHostNet&#39;, &#39;ClusterFirst&#39;, &#39;Default&#39; or &#39;None&#39;. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to &#39;ClusterFirstWithHostNet&#39;..</param>
 /// <param name="entrypoint">Entrypoint is a template reference to the starting point of the workflow (required).</param>
 /// <param name="hostAliases">HostAliases is an optional list of hosts and IPs that will be injected into the pod spec.</param>
 /// <param name="hostNetwork">Host networking requested for this workflow pod. Default to false..</param>
 /// <param name="imagePullSecrets">ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod.</param>
 /// <param name="nodeSelector">NodeSelector is a selector which will result in all pods of the workflow to be scheduled on the selected node(s). This is able to be overridden by a nodeSelector specified in the template..</param>
 /// <param name="onExit">OnExit is a template reference which is invoked at the end of the workflow, irrespective of the success, failure, or error of the primary workflow..</param>
 /// <param name="parallelism">Parallelism limits the max total parallel pods that can execute at the same time in a workflow.</param>
 /// <param name="podGC">PodGC describes the strategy to use when to deleting completed pods.</param>
 /// <param name="podPriority">Priority to apply to workflow pods..</param>
 /// <param name="podPriorityClassName">PriorityClassName to apply to workflow pods..</param>
 /// <param name="priority">Priority is used if controller is configured to process limited number of workflows in parallel. Workflows with higher priority are processed first..</param>
 /// <param name="schedulerName">Set scheduler name for all pods. Will be overridden if container/script template&#39;s scheduler name is set. Default scheduler will be used if neither specified..</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 is the name of the ServiceAccount to run all pods of the workflow as..</param>
 /// <param name="suspend">Suspend will suspend the workflow and prevent execution of any future steps in the workflow.</param>
 /// <param name="templates">Templates is a list of workflow templates used in a workflow (required).</param>
 /// <param name="tolerations">Tolerations to apply to workflow pods..</param>
 /// <param name="ttlSecondsAfterFinished">TTLSecondsAfterFinished limits the lifetime of a Workflow that has finished execution (Succeeded, Failed, Error). If this field is set, once the Workflow finishes, it will be deleted after ttlSecondsAfterFinished expires. If this field is unset, ttlSecondsAfterFinished will not expire. If this field is set to zero, ttlSecondsAfterFinished expires immediately after the Workflow finishes..</param>
 /// <param name="volumeClaimTemplates">VolumeClaimTemplates is a list of claims that containers are allowed to reference. The Workflow controller will create the claims at the beginning of the workflow and delete the claims upon completion of the workflow.</param>
 /// <param name="volumes">Volumes is a list of volumes that can be mounted by containers in a workflow..</param>
 public ArgoWorkflowSpec(long?activeDeadlineSeconds = default(long?), k8s.Models.V1Affinity affinity = default(k8s.Models.V1Affinity), ArgoArguments arguments = default(ArgoArguments), ArgoArtifactRepositoryRef artifactRepositoryRef = default(ArgoArtifactRepositoryRef), k8s.Models.V1PodDNSConfig dnsConfig = default(k8s.Models.V1PodDNSConfig), string dnsPolicy = default(string), string entrypoint = default(string), List <k8s.Models.V1HostAlias> hostAliases = default(List <k8s.Models.V1HostAlias>), bool?hostNetwork = default(bool?), List <k8s.Models.V1LocalObjectReference> imagePullSecrets = default(List <k8s.Models.V1LocalObjectReference>), Dictionary <string, string> nodeSelector = default(Dictionary <string, string>), string onExit = default(string), long?parallelism = default(long?), ArgoPodGC podGC = default(ArgoPodGC), int?podPriority = default(int?), string podPriorityClassName = default(string), int?priority = default(int?), string schedulerName = default(string), k8s.Models.V1PodSecurityContext securityContext = default(k8s.Models.V1PodSecurityContext), string serviceAccountName = default(string), bool?suspend = default(bool?), List <ArgoTemplate> templates = default(List <ArgoTemplate>), List <k8s.Models.V1Toleration> tolerations = default(List <k8s.Models.V1Toleration>), int?ttlSecondsAfterFinished = default(int?), List <k8s.Models.V1PersistentVolumeClaim> volumeClaimTemplates = default(List <k8s.Models.V1PersistentVolumeClaim>), List <k8s.Models.V1Volume> volumes = default(List <k8s.Models.V1Volume>))
 {
     // to ensure "entrypoint" is required (not null)
     if (entrypoint == null)
     {
         throw new InvalidDataException("entrypoint is a required property for ArgoWorkflowSpec and cannot be null");
     }
     else
     {
         this.Entrypoint = entrypoint;
     }
     // to ensure "templates" is required (not null)
     if (templates == null)
     {
         throw new InvalidDataException("templates is a required property for ArgoWorkflowSpec and cannot be null");
     }
     else
     {
         this.Templates = templates;
     }
     this.ActiveDeadlineSeconds = activeDeadlineSeconds;
     this.Affinity              = affinity;
     this.Arguments             = arguments;
     this.ArtifactRepositoryRef = artifactRepositoryRef;
     this.DnsConfig             = dnsConfig;
     this.DnsPolicy             = dnsPolicy;
     this.HostAliases           = hostAliases;
     this.HostNetwork           = hostNetwork;
     this.ImagePullSecrets      = imagePullSecrets;
     this.NodeSelector          = nodeSelector;
     this.OnExit                  = onExit;
     this.Parallelism             = parallelism;
     this.PodGC                   = podGC;
     this.PodPriority             = podPriority;
     this.PodPriorityClassName    = podPriorityClassName;
     this.Priority                = priority;
     this.SchedulerName           = schedulerName;
     this.SecurityContext         = securityContext;
     this.ServiceAccountName      = serviceAccountName;
     this.Suspend                 = suspend;
     this.Tolerations             = tolerations;
     this.TtlSecondsAfterFinished = ttlSecondsAfterFinished;
     this.VolumeClaimTemplates    = volumeClaimTemplates;
     this.Volumes                 = volumes;
 }
Ejemplo n.º 5
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;
 }