Documentation
¶
Overview ¶
Package v1alpha1 contains resources relating to the Open Application Model. See https://github.com/oam-dev/spec for more details. +kubebuilder:object:generate=true +groupName=core.oam.dev +versionName=v1alpha1
Index ¶
- Constants
- Variables
- type StepInputs
- type StepOutputs
- type StepStatus
- type Workflow
- type WorkflowExecuteMode
- type WorkflowList
- type WorkflowMode
- type WorkflowRun
- func (in *WorkflowRun) DeepCopy() *WorkflowRun
- func (in *WorkflowRun) DeepCopyInto(out *WorkflowRun)
- func (in *WorkflowRun) DeepCopyObject() runtime.Object
- func (wr *WorkflowRun) GetCondition(t condition.ConditionType) condition.Condition
- func (wr *WorkflowRun) SetConditions(c ...condition.Condition)
- type WorkflowRunList
- type WorkflowRunPhase
- type WorkflowRunSpec
- type WorkflowRunStatus
- type WorkflowSpec
- type WorkflowStep
- type WorkflowStepBase
- type WorkflowStepMeta
- type WorkflowStepPhase
- type WorkflowStepStatus
Constants ¶
const ( // ReasonExecute is the reason for executing a workflow ReasonExecute = "Execute" // ReasonGenerate is the reason for generating a workflow ReasonGenerate = "Generate" )
const ( // MessageSuccessfully is the message for successfully MessageSuccessfully = "WorkflowRun finished successfully" // MessageTerminated is the message for terminated MessageTerminated = "WorkflowRun finished with termination" // MessageFailed is the message for failed MessageFailed = "WorkflowRun finished with failure" // MessageFailedGenerate is the message for failed to generate MessageFailedGenerate = "fail to generate workflow runners" // MessageFailedExecute is the message for failed to execute MessageFailedExecute = "fail to execute" )
const ( Group = "core.oam.dev" Version = "v1alpha1" )
Package type metadata.
const WorkflowRunConditionType string = "WorkflowRun"
WorkflowRunConditionType is a valid condition type for a WorkflowRun
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var ( WorkflowKind = "Workflow" WorkflowGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowKind) )
Workflow meta
var ( WorkflowRunKind = "WorkflowRun" WorkflowRunGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowRunKind) )
WorkflowRun meta
Functions ¶
This section is empty.
Types ¶
type StepInputs ¶
type StepInputs []inputItem
StepInputs defines variable input of WorkflowStep
func (StepInputs) DeepCopy ¶
func (in StepInputs) DeepCopy() StepInputs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepInputs.
func (StepInputs) DeepCopyInto ¶
func (in StepInputs) DeepCopyInto(out *StepInputs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StepOutputs ¶
type StepOutputs []outputItem
StepOutputs defines output variable of WorkflowStep
func (StepOutputs) DeepCopy ¶
func (in StepOutputs) DeepCopy() StepOutputs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepOutputs.
func (StepOutputs) DeepCopyInto ¶
func (in StepOutputs) DeepCopyInto(out *StepOutputs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StepStatus ¶
type StepStatus struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Phase WorkflowStepPhase `json:"phase,omitempty"`
// A human readable message indicating details about why the workflowStep is in this state.
Message string `json:"message,omitempty"`
// A brief CamelCase message indicating details about why the workflowStep is in this state.
Reason string `json:"reason,omitempty"`
// FirstExecuteTime is the first time this step execution.
FirstExecuteTime metav1.Time `json:"firstExecuteTime,omitempty"`
// LastExecuteTime is the last time this step execution.
LastExecuteTime metav1.Time `json:"lastExecuteTime,omitempty"`
}
StepStatus record the base status of workflow step, which could be workflow step or subStep
func (*StepStatus) DeepCopy ¶
func (in *StepStatus) DeepCopy() *StepStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepStatus.
func (*StepStatus) DeepCopyInto ¶
func (in *StepStatus) DeepCopyInto(out *StepStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workflow ¶
type Workflow struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Mode *WorkflowExecuteMode `json:"mode,omitempty"`
WorkflowSpec `json:",inline"`
}
Workflow is the Schema for the workflow API +kubebuilder:storageversion +kubebuilder:resource:categories={oam} +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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 WorkflowExecuteMode ¶
type WorkflowExecuteMode struct {
// Steps is the mode of workflow steps execution
Steps WorkflowMode `json:"steps,omitempty"`
// SubSteps is the mode of workflow sub steps execution
SubSteps WorkflowMode `json:"subSteps,omitempty"`
}
WorkflowExecuteMode defines the mode of workflow execution
func (*WorkflowExecuteMode) DeepCopy ¶
func (in *WorkflowExecuteMode) DeepCopy() *WorkflowExecuteMode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowExecuteMode.
func (*WorkflowExecuteMode) DeepCopyInto ¶
func (in *WorkflowExecuteMode) DeepCopyInto(out *WorkflowExecuteMode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowList ¶
type WorkflowList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Workflow `json:"items"`
}
WorkflowList contains a 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 WorkflowMode ¶
type WorkflowMode string
WorkflowMode describes the mode of workflow
const ( // WorkflowModeDAG describes the DAG mode of workflow WorkflowModeDAG WorkflowMode = "DAG" // WorkflowModeStep describes the step by step mode of workflow WorkflowModeStep WorkflowMode = "StepByStep" )
type WorkflowRun ¶
type WorkflowRun struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkflowRunSpec `json:"spec,omitempty"`
Status WorkflowRunStatus `json:"status,omitempty"`
}
WorkflowRun is the Schema for the workflowRun API +kubebuilder:storageversion +kubebuilder:resource:categories={oam},shortName={wr} +kubebuilder:subresource:status +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkflowRun) DeepCopy ¶
func (in *WorkflowRun) DeepCopy() *WorkflowRun
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowRun.
func (*WorkflowRun) DeepCopyInto ¶
func (in *WorkflowRun) DeepCopyInto(out *WorkflowRun)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowRun) DeepCopyObject ¶
func (in *WorkflowRun) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WorkflowRun) GetCondition ¶
func (wr *WorkflowRun) GetCondition(t condition.ConditionType) condition.Condition
GetCondition get condition by given condition type
func (*WorkflowRun) SetConditions ¶
func (wr *WorkflowRun) SetConditions(c ...condition.Condition)
SetConditions set condition to workflow run
type WorkflowRunList ¶
type WorkflowRunList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WorkflowRun `json:"items"`
}
WorkflowRunList contains a list of WorkflowRun +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkflowRunList) DeepCopy ¶
func (in *WorkflowRunList) DeepCopy() *WorkflowRunList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowRunList.
func (*WorkflowRunList) DeepCopyInto ¶
func (in *WorkflowRunList) DeepCopyInto(out *WorkflowRunList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkflowRunList) DeepCopyObject ¶
func (in *WorkflowRunList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (WorkflowRunList) Len ¶
func (w WorkflowRunList) Len() int
func (WorkflowRunList) Less ¶
func (w WorkflowRunList) Less(i, j int) bool
func (WorkflowRunList) Swap ¶
func (w WorkflowRunList) Swap(i, j int)
type WorkflowRunPhase ¶
type WorkflowRunPhase string
WorkflowRunPhase is a label for the condition of a WorkflowRun at the current time
const ( // WorkflowStateInitializing means the workflow run is initializing WorkflowStateInitializing WorkflowRunPhase = "initializing" // WorkflowStateExecuting means the workflow run is executing WorkflowStateExecuting WorkflowRunPhase = "executing" // WorkflowStateSuspending means the workflow run is suspending WorkflowStateSuspending WorkflowRunPhase = "suspending" // WorkflowStateTerminated means the workflow run is terminated WorkflowStateTerminated WorkflowRunPhase = "terminated" // WorkflowStateFailed means the workflow run is failed WorkflowStateFailed WorkflowRunPhase = "failed" // WorkflowStateSucceeded means the workflow run is succeeded WorkflowStateSucceeded WorkflowRunPhase = "succeeded" // WorkflowStateSkipped means the workflow run is skipped WorkflowStateSkipped WorkflowRunPhase = "skipped" )
type WorkflowRunSpec ¶
type WorkflowRunSpec struct {
// +kubebuilder:pruning:PreserveUnknownFields
Context *runtime.RawExtension `json:"context,omitempty"`
Mode *WorkflowExecuteMode `json:"mode,omitempty"`
WorkflowSpec *WorkflowSpec `json:"workflowSpec,omitempty"`
WorkflowRef string `json:"workflowRef,omitempty"`
}
WorkflowRunSpec is the spec for the WorkflowRun
func (*WorkflowRunSpec) DeepCopy ¶
func (in *WorkflowRunSpec) DeepCopy() *WorkflowRunSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowRunSpec.
func (*WorkflowRunSpec) DeepCopyInto ¶
func (in *WorkflowRunSpec) DeepCopyInto(out *WorkflowRunSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowRunStatus ¶
type WorkflowRunStatus struct {
condition.ConditionedStatus `json:",inline"`
Mode WorkflowExecuteMode `json:"mode"`
Phase WorkflowRunPhase `json:"status"`
Message string `json:"message,omitempty"`
Suspend bool `json:"suspend"`
SuspendState string `json:"suspendState,omitempty"`
Terminated bool `json:"terminated"`
Finished bool `json:"finished"`
ContextBackend *corev1.ObjectReference `json:"contextBackend,omitempty"`
Steps []WorkflowStepStatus `json:"steps,omitempty"`
StartTime metav1.Time `json:"startTime,omitempty"`
EndTime metav1.Time `json:"endTime,omitempty"`
}
WorkflowRunStatus record the status of workflow run
func (*WorkflowRunStatus) DeepCopy ¶
func (in *WorkflowRunStatus) DeepCopy() *WorkflowRunStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowRunStatus.
func (*WorkflowRunStatus) DeepCopyInto ¶
func (in *WorkflowRunStatus) DeepCopyInto(out *WorkflowRunStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowSpec ¶
type WorkflowSpec struct {
Steps []WorkflowStep `json:"steps,omitempty"`
}
WorkflowSpec defines workflow steps and other attributes
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 WorkflowStep ¶
type WorkflowStep struct {
WorkflowStepBase `json:",inline"`
SubSteps []WorkflowStepBase `json:"subSteps,omitempty"`
}
WorkflowStep defines how to execute a 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 WorkflowStepBase ¶
type WorkflowStepBase struct {
// Name is the unique name of the workflow step.
Name string `json:"name,omitempty"`
// Type is the type of the workflow step.
Type string `json:"type"`
// Meta is the meta data of the workflow step.
Meta *WorkflowStepMeta `json:"meta,omitempty"`
// If is the if condition of the step
If string `json:"if,omitempty"`
// Timeout is the timeout of the step
Timeout string `json:"timeout,omitempty"`
// DependsOn is the dependency of the step
DependsOn []string `json:"dependsOn,omitempty"`
// Inputs is the inputs of the step
Inputs StepInputs `json:"inputs,omitempty"`
// Outputs is the outputs of the step
Outputs StepOutputs `json:"outputs,omitempty"`
// Properties is the properties of the step
// +kubebuilder:pruning:PreserveUnknownFields
Properties *runtime.RawExtension `json:"properties,omitempty"`
}
WorkflowStepBase defines the workflow step base
func (*WorkflowStepBase) DeepCopy ¶
func (in *WorkflowStepBase) DeepCopy() *WorkflowStepBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepBase.
func (*WorkflowStepBase) DeepCopyInto ¶
func (in *WorkflowStepBase) DeepCopyInto(out *WorkflowStepBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStepMeta ¶
type WorkflowStepMeta struct {
Alias string `json:"alias,omitempty"`
}
WorkflowStepMeta contains the meta data of a workflow step
func (*WorkflowStepMeta) DeepCopy ¶
func (in *WorkflowStepMeta) DeepCopy() *WorkflowStepMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepMeta.
func (*WorkflowStepMeta) DeepCopyInto ¶
func (in *WorkflowStepMeta) DeepCopyInto(out *WorkflowStepMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStepPhase ¶
type WorkflowStepPhase string
WorkflowStepPhase describes the phase of a workflow step.
const ( // WorkflowStepPhaseSucceeded will make the controller run the next step. WorkflowStepPhaseSucceeded WorkflowStepPhase = "succeeded" // WorkflowStepPhaseFailed will report error in `message`. WorkflowStepPhaseFailed WorkflowStepPhase = "failed" // WorkflowStepPhaseSkipped will make the controller skip the step. WorkflowStepPhaseSkipped WorkflowStepPhase = "skipped" // WorkflowStepPhaseRunning will make the controller continue the workflow. WorkflowStepPhaseRunning WorkflowStepPhase = "running" // WorkflowStepPhasePending will make the controller wait for the step to run. WorkflowStepPhasePending WorkflowStepPhase = "pending" )
type WorkflowStepStatus ¶
type WorkflowStepStatus struct {
StepStatus `json:",inline"`
SubStepsStatus []StepStatus `json:"subSteps,omitempty"`
}
WorkflowStepStatus record the status of a workflow step, include step status and subStep status
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.