Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=execution.kubegene.io
Index ¶
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type CommandsIter
- type Condition
- type DependType
- type Dependent
- type Execution
- type ExecutionList
- type ExecutionSpec
- type ExecutionStatus
- type GenericCondition
- type MatchOperator
- type MatchRule
- type ResourceRequirements
- type Task
- type TaskType
- type VertexPhase
- type VertexStatus
- type VertexType
- type Volume
- type VolumeSource
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: gene.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CommandsIter ¶
type CommandsIter struct { // Command is the base command that contains variables. Command string `json:"command"` // VarsIter list all the possible parameters for every position in the command line. // And we will use algorithm Of Full Permutation to generate all the permutation and // combinations for these parameter that will be used to replace the ${number} variable. // // commandsIter example // // commandsIter: // command: sh /tmp/scripts/step1.splitfq.sh ${1} ${2} /tmp/data ${3} // varsIter: // - ["sample1", "sample2"] // - [0,1] // - get_result( job-1, " ") // if stdout of job-1 is “1 2 3 4” then varsIter will become like // vars_iter: // - ["sample1", "sample2"] // - [0,1] // - ["1", "2"] // // sh /tmp/scripts/step1.splitfq.sh sample1 0 /tmp/data 1 // sh /tmp/scripts/step1.splitfq.sh sample2 0 /tmp/data 1 // sh /tmp/scripts/step1.splitfq.sh sample1 1 /tmp/data 1 // sh /tmp/scripts/step1.splitfq.sh sample2 1 /tmp/data 1 // sh /tmp/scripts/step1.splitfq.sh sample1 0 /tmp/data 2 // sh /tmp/scripts/step1.splitfq.sh sample2 0 /tmp/data 2 // sh /tmp/scripts/step1.splitfq.sh sample1 1 /tmp/data 2 // sh /tmp/scripts/step1.splitfq.sh sample2 1 /tmp/data 2 VarsIter []interface{} `json:"varsIter,omitempty"` }
CommandsIter defines command for workflows job. If both Vars and Vars_iter are specified, the generate command will be merged. This is used for the dynamically generating task based on the get_result
func (*CommandsIter) DeepCopy ¶
func (in *CommandsIter) DeepCopy() *CommandsIter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandsIter.
func (*CommandsIter) DeepCopyInto ¶
func (i *CommandsIter) DeepCopyInto(out *CommandsIter)
DeepCopyInto is an custom deepcopy function to deal with our use of the interface{} type
type Condition ¶
type Condition struct {
Condition interface{} `json:"condition,omitempty"`
}
Condition in Task
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an custom deepcopy function to deal with our use of the interface{} type
type DependType ¶
type DependType string
DependType is the type of depend
const ( DependTypeWhole DependType = "whole" DependTypeIterate DependType = "iterate" )
DependType
type Dependent ¶
type Dependent struct { // Target is the name of task this depends on. Target string `json:"target"` // Type is the depends type. // Default to `whole`. // Examples: // "whole" - A-->B": jobs of B depends on all jobs of A execution done. // "iterate" - A[1,2,3]-->B[1,2,3]: jobs of B depends on jobs of A one by one. // That is to say: A[1]->B[1], A[2]->B[2], A[3]->B[3] Type DependType `json:"type,omitempty"` }
func (*Dependent) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependent.
func (*Dependent) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Execution ¶
type Execution struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec ExecutionSpec `json:"spec,omitempty"` // +optional Status ExecutionStatus `json:"status,omitempty"` }
Execution is the definition of kubegene workflow.
func (*Execution) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution.
func (*Execution) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Execution) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExecutionList ¶
type ExecutionList struct { metav1.TypeMeta `json:",inline" ` // +optional metav1.ListMeta `json:"metadata,omitempty"` // Items is a list of executions. Items []Execution `json:"items"` }
ExecutionList is a collection of executions.
func (*ExecutionList) DeepCopy ¶
func (in *ExecutionList) DeepCopy() *ExecutionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionList.
func (*ExecutionList) DeepCopyInto ¶
func (in *ExecutionList) DeepCopyInto(out *ExecutionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExecutionList) DeepCopyObject ¶
func (in *ExecutionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExecutionSpec ¶
type ExecutionSpec struct { // Tasks is a list of Tasks used in a workflow Tasks []Task `json:"tasks"` // 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 job. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Affinity sets the scheduling constraints for all pods in the workflow. // Can be overridden by an affinity specified in the Job // +optional Affinity *apiv1.Affinity `json:"affinity,omitempty"` // Tolerations to apply to workflow pods. // +optional Tolerations []apiv1.Toleration `json:"tolerations,omitempty"` // Parallelism limits the max total parallel jobs that can execute at the same time in a workflow // +optional Parallelism *int64 `json:"parallelism,omitempty"` }
func (*ExecutionSpec) DeepCopy ¶
func (in *ExecutionSpec) DeepCopy() *ExecutionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionSpec.
func (*ExecutionSpec) DeepCopyInto ¶
func (in *ExecutionSpec) DeepCopyInto(out *ExecutionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionStatus ¶
type ExecutionStatus struct { // Phase a simple, high-level summary of where the workflow is in its lifecycle. Phase VertexPhase `json:"phase,omitempty"` // Time at which this workflow started StartedAt metav1.Time `json:"startedAt,omitempty"` // Time at which this workflow completed FinishedAt metav1.Time `json:"finishedAt,omitempty"` // A human readable message indicating details about why the workflow is in this condition. Message string `json:"message,omitempty"` // Vertices is a mapping between a vertex ID and the vertex's status. Vertices map[string]VertexStatus `json:"vertices,omitempty"` }
+k8s:openapi-gen=false
func (*ExecutionStatus) DeepCopy ¶
func (in *ExecutionStatus) DeepCopy() *ExecutionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionStatus.
func (*ExecutionStatus) DeepCopyInto ¶
func (in *ExecutionStatus) DeepCopyInto(out *ExecutionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GenericCondition ¶
type GenericCondition struct { // when we use generic condition this DependJobName should be same as jobName in Depends // and Depends should have only one JobName DependJobName string `json:"dependJobName"` MatchRules []MatchRule `json:"matchRules"` }
generic Conditional dynamic handling match rules are ORed.
func (*GenericCondition) DeepCopy ¶
func (in *GenericCondition) DeepCopy() *GenericCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericCondition.
func (*GenericCondition) DeepCopyInto ¶
func (in *GenericCondition) DeepCopyInto(out *GenericCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MatchOperator ¶
type MatchOperator string
A match operator is the set of operators that can be used in a MatchRule.
const ( MatchOperatorOpIn MatchOperator = "In" MatchOperatorOpNotIn MatchOperator = "NotIn" MatchOperatorOpExists MatchOperator = "Exists" MatchOperatorOpDoesNotExist MatchOperator = "DoesNotExist" MatchOperatorOpGt MatchOperator = "Gt" MatchOperatorOpLt MatchOperator = "Lt" MatchOperatorOpEqual MatchOperator = "=" MatchOperatorOpNotEqual MatchOperator = "!=" MatchOperatorOpDoubleEqual MatchOperator = "==" )
type MatchRule ¶
type MatchRule struct { // The key that the requirement applies to. Key string `json:"key"` // Represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. Operator MatchOperator `json:"operator"` // An array of string values. If the operator is In or NotIn, // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. If the operator is Gt or Lt, the values // array must have a single element, which will be interpreted as an integer. // +optional Values []string `json:"values,omitempty"` }
A matching rules is a requirement that contains values, a key, and an operator that relates the key and values.
func (*MatchRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchRule.
func (*MatchRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRequirements ¶
type ResourceRequirements struct { Memory resource.Quantity `json:"memory"` Cpu resource.Quantity `json:"cpu"` }
func (*ResourceRequirements) DeepCopy ¶
func (in *ResourceRequirements) DeepCopy() *ResourceRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirements.
func (*ResourceRequirements) DeepCopyInto ¶
func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Task ¶
type Task struct { // Name is the name of the task Name string `json:"name"` // Type is the type of the task Type TaskType `json:"type"` // 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 execution level. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Affinity sets the pod's scheduling constraints // Overrides the affinity set at the execution level (if any) // +optional Affinity *apiv1.Affinity `json:"affinity,omitempty"` // Tolerations to apply to task pods. // Overrides the tolerations set at the execution level (if any) // +optional Tolerations []apiv1.Toleration `json:"tolerations,omitempty"` // CommandSet is a list of commands run by this task. CommandSet []string `json:"commandSet,omitempty"` // CommandsIter defines batch command for workflows job. CommandsIter *CommandsIter `json:"commandsIter,omitempty"` // Docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images Image string `json:"image,omitempty"` // Volumes is a list of volumes that can be mounted by containers in the task. // +optional Volumes map[string]Volume `json:"volumes,omitempty"` // +optional Resources ResourceRequirements `json:"resources,omitempty"` // Specifies the duration in seconds relative to the startTime that the job may be active // before the system tries to terminate it; value must be positive integer // +optional ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` // Specifies the number of retries before marking this job failed. // If not set use the k8s job default. // +optional BackoffLimit *int32 `json:"backoffLimit,omitempty"` // Parallelism limits the max total parallel jobs that can execute at the same time within the // boundaries of this job invocation. // Overrides the parallelism set at the execution level (if any) Parallelism *int64 `json:"parallelism,omitempty"` // Specifies the dependency by this task // +optional Dependents []Dependent `json:"dependents"` // Specifies the condition for this task // The task will be executed only when condition satisfied // +optional Condition *Condition `json:"condition,omitempty"` // Specifies the generic condition for this task // The task will be executed only when any one of the rule of condition is satisfied // +optional GenericCondition *GenericCondition `json:"genericCondition,omitempty"` }
Task is a unit of execution in an Execution
func (*Task) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VertexPhase ¶
type VertexPhase string
VertexPhase is a label for the condition of a node at the current time.
const ( VertexRunning VertexPhase = "Running" VertexSucceeded VertexPhase = "Succeeded" VertexFailed VertexPhase = "Failed" VertexError VertexPhase = "Error" )
Vertex status in the execution.
type VertexStatus ¶
type VertexStatus struct { // ID is a unique identifier of a vertex within the worklow // It is implemented as a hash of the vertex name, which makes the ID deterministic ID string `json:"id"` // Name is unique name in the graph tree used to generate the vertex ID Name string `json:"name"` // Type indicates type of vertex Type VertexType `json:"type"` // Phase a simple, high-level summary of where the vertex is in its lifecycle. // Can be used as a state machine. Phase VertexPhase `json:"phase,omitempty"` // A human readable message indicating details about why the vertex is in this condition. Message string `json:"message,omitempty"` // Time at which this vertex started StartedAt metav1.Time `json:"startedAt,omitempty"` // Time at which this vertex completed FinishedAt metav1.Time `json:"finishedAt,omitempty"` // Children is a list of child vertex IDs Children []string `json:"children,omitempty"` }
func (*VertexStatus) DeepCopy ¶
func (in *VertexStatus) DeepCopy() *VertexStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VertexStatus.
func (*VertexStatus) DeepCopyInto ¶
func (in *VertexStatus) DeepCopyInto(out *VertexStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VertexType ¶
type VertexType string
VertexType is the type of a vertex
const ( DAGVertexType VertexType = "DAG" JobVertexType VertexType = "Job" JobGroupVertexType VertexType = "JobGroup" SparkVertexType VertexType = "Spark" SparkGroupVertexType VertexType = "SparkGroup" )
DAG vertex types
type Volume ¶
type Volume struct { MountPath string `json:"mountPath"` MountFrom VolumeSource `json:"mountFrom"` }
func (*Volume) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSource ¶
type VolumeSource struct {
Pvc string `json:"pvc"`
}
func (*VolumeSource) DeepCopy ¶
func (in *VolumeSource) DeepCopy() *VolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource.
func (*VolumeSource) DeepCopyInto ¶
func (in *VolumeSource) DeepCopyInto(out *VolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.