Documentation
¶
Overview ¶
Package v1 is the version 1 of the Workflow ApI +k8s:deepcopy-gen=package
Index ¶
- Constants
- Variables
- func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFuncdeprecated
- func IsWorkflowDefaulted(w *Workflow) bool
- func Kind(kind string) schema.GroupKind
- func RemoveStepFromSpec(w *Workflow, stepName string) error
- func Resource(resource string) schema.GroupResource
- func ValidateExternalReference(externalReference *api.ObjectReference, fieldPath *field.Path) field.ErrorList
- func ValidateJobTemplateSpec(spec *batchv2.JobTemplateSpec, fldPath *field.Path) field.ErrorList
- func ValidateWorkflow(workflow *Workflow) field.ErrorList
- func ValidateWorkflowSpec(spec *WorkflowSpec, fieldPath *field.Path) field.ErrorList
- func ValidateWorkflowSpecUpdate(spec, oldSpec *WorkflowSpec, running, completed map[string]bool, ...) field.ErrorList
- func ValidateWorkflowStatus(status *WorkflowStatus, fieldPath *field.Path) field.ErrorList
- func ValidateWorkflowStatusUpdate(status, oldStatus WorkflowStatus) field.ErrorList
- func ValidateWorkflowSteps(steps []WorkflowStep, fieldPath *field.Path) field.ErrorList
- func ValidateWorkflowUpdate(workflow, oldWorkflow *Workflow) field.ErrorList
- func ValidateWorkflowUpdateStatus(workflow, oldWorkflow *Workflow) field.ErrorList
- type Workflow
- type WorkflowCondition
- type WorkflowConditionType
- type WorkflowList
- type WorkflowSpec
- type WorkflowStatus
- type WorkflowStep
- type WorkflowStepStatus
Constants ¶
const ( // ResourcePlural is the id to indentify pluarals ResourcePlural = "workflows" // ResourceSingular represents the id for identify singular resource ResourceSingular = "workflow" // ResourceKind ResourceKind = "Workflow" // ReourceVersion ResourceVersion = "v1" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: workflow.GroupName, Version: ResourceVersion}
SchemeGroupVersion is the group version used to register these objects.
Functions ¶
func GetGeneratedDeepCopyFuncs
deprecated
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc
GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func IsWorkflowDefaulted ¶
IsWorkflowDefaulted check wether
func RemoveStepFromSpec ¶
RemoveStepFromSpec removes Step from Workflow Spec
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
func ValidateExternalReference ¶
func ValidateExternalReference(externalReference *api.ObjectReference, fieldPath *field.Path) field.ErrorList
ValidateExternalReference validates external object reference
func ValidateJobTemplateSpec ¶
func ValidateWorkflow ¶
ValidateWorkflow validates Workflow
func ValidateWorkflowSpec ¶
func ValidateWorkflowSpec(spec *WorkflowSpec, fieldPath *field.Path) field.ErrorList
ValidateWorkflowSpec validates WorkflowSpec
func ValidateWorkflowStatus ¶
func ValidateWorkflowStatus(status *WorkflowStatus, fieldPath *field.Path) field.ErrorList
ValidateWorkflowStatus validates status
func ValidateWorkflowStatusUpdate ¶
func ValidateWorkflowStatusUpdate(status, oldStatus WorkflowStatus) field.ErrorList
ValidateWorkflowStatusUpdate validates WorkflowStatus during update
func ValidateWorkflowSteps ¶
func ValidateWorkflowSteps(steps []WorkflowStep, fieldPath *field.Path) field.ErrorList
ValidateWorkflowSteps validates steps. It detects cycles (with topological sort) and checks whether JobSpec are correct
func ValidateWorkflowUpdate ¶
ValidateWorkflowUpdate validates Workflow during update
Types ¶
type Workflow ¶
type Workflow struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec represents the desired behaviour of the Workflow.
Spec WorkflowSpec `json:"spec,omitempty"`
// Status contains the current status off the Workflow
Status WorkflowStatus `json:"status,omitempty"`
}
Workflow represents a DAG workflow +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func DefaultWorkflow ¶
DefaultWorkflow defaults workflow
func (*Workflow) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
func (*Workflow) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workflow) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowCondition ¶
type WorkflowCondition struct {
// Type of workflow condition
Type WorkflowConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status api.ConditionStatus `json:"status"`
// Last time the condition was checked.
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
// Last time the condition transited from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// (brief) reason for the condition's last transition.
Reason string `json:"reason,omitempty"`
// Human readable message indicating details about last transition.
Message string `json:"message,omitempty"`
}
WorkflowCondition represent the condition of the Workflow
func (*WorkflowCondition) DeepCopy ¶
func (in *WorkflowCondition) DeepCopy() *WorkflowCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowCondition.
func (*WorkflowCondition) DeepCopyInto ¶
func (in *WorkflowCondition) DeepCopyInto(out *WorkflowCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowConditionType ¶
type WorkflowConditionType string
WorkflowConditionType is the type of WorkflowCondition
const ( // WorkflowComplete means the workflow has completed its execution. WorkflowComplete WorkflowConditionType = "Complete" // WorkflowFailed means the workflow has failed its execution. WorkflowFailed WorkflowConditionType = "Failed" )
These are valid conditions of a workflow.
type WorkflowList ¶
type WorkflowList struct {
metav1.TypeMeta `json:",inline"`
// Standard list metadata
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
metav1.ListMeta `json:"metadata,omitempty"`
// Items is the list of Workflow
Items []Workflow `json:"items"`
}
WorkflowList implements list of Workflow. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkflowList) DeepCopy ¶
func (in *WorkflowList) DeepCopy() *WorkflowList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowList.
func (*WorkflowList) DeepCopyInto ¶
func (in *WorkflowList) DeepCopyInto(out *WorkflowList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowList) DeepCopyObject ¶
func (in *WorkflowList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowSpec ¶
type WorkflowSpec struct {
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
Steps []WorkflowStep `json:"steps,omitempty"`
// Selector for created jobs (if any)
Selector *metav1.LabelSelector `json:"selector,omitempty"`
}
WorkflowSpec contains Workflow specification
func (*WorkflowSpec) DeepCopy ¶
func (in *WorkflowSpec) DeepCopy() *WorkflowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.
func (*WorkflowSpec) DeepCopyInto ¶
func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStatus ¶
type WorkflowStatus struct {
// Conditions represent the latest available observations of an object's current state.
Conditions []WorkflowCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// StartTime represents time when the workflow was acknowledged by the Workflow controller
// It is not guaranteed to be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// StartTime doesn't consider startime of `ExternalReference`
StartTime *metav1.Time `json:"startTime,omitempty"`
// CompletionTime represents time when the workflow was completed. It is not guaranteed to
// be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
// Statuses represent status of different steps
Statuses []WorkflowStepStatus `json:"statuses"`
}
WorkflowStatus represents the status of Workflow
func (*WorkflowStatus) DeepCopy ¶
func (in *WorkflowStatus) DeepCopy() *WorkflowStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.
func (*WorkflowStatus) DeepCopyInto ¶
func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStep ¶
type WorkflowStep struct {
// Name of the step
Name string `json:"name,omitempty"`
// JobTemplate contains the job specificaton that should be run in this Workflow.
// Only one between externalRef and JobTemplate can be set.
JobTemplate *batch.JobTemplateSpec `json:"jobTemplate,omitempty"`
// External contains a reference to another schedulable resource.
// Only one between ExternalRef and JobTemplate can be set.
ExternalRef *api.ObjectReference `json:"externalRef,omitempty"`
// Dependecies represent dependecies of the current workflow step
Dependencies []string `json:"dependencies,omitempty"`
}
WorkflowStep contains necessary information to identifiy the node of the workflow graph
func GetStepByName ¶
func GetStepByName(w *Workflow, stepName string) *WorkflowStep
GetStepByName returns a pointer to Workflow Step
func (*WorkflowStep) DeepCopy ¶
func (in *WorkflowStep) DeepCopy() *WorkflowStep
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStep.
func (*WorkflowStep) DeepCopyInto ¶
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStepStatus ¶
type WorkflowStepStatus struct {
// Name represents the Name of the Step
Name string `json:"name,omitempty"`
// Complete reports the completion of status`
Complete bool `json:"complete"`
// Reference contains a reference to the WorkflowStep
Reference api.ObjectReference `json:"reference"`
}
WorkflowStepStatus contains necessary information for the step status
func GetStepStatusByName ¶
func GetStepStatusByName(w *Workflow, stepName string) *WorkflowStepStatus
GetStepStatusByName returns a pointer to Workflow Step
func (*WorkflowStepStatus) DeepCopy ¶
func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepStatus.
func (*WorkflowStepStatus) DeepCopyInto ¶
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.