v1alpha1

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 29

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

View Source
const (
	// ReasonExecute is the reason for executing a workflow
	ReasonExecute = "Execute"
	// ReasonGenerate is the reason for generating a workflow
	ReasonGenerate = "Generate"
)
View Source
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"
)
View Source
const (
	Group   = "core.oam.dev"
	Version = "v1alpha1"
)

Package type metadata.

View Source
const (
	// WorkflowModeDAG describes the DAG mode of workflow
	WorkflowModeDAG oamv1alpha1.WorkflowMode = "DAG"
	// WorkflowModeStep describes the step by step mode of workflow
	WorkflowModeStep oamv1alpha1.WorkflowMode = "StepByStep"
)
View Source
const WorkflowRunConditionType string = "WorkflowRun"

WorkflowRunConditionType is a valid condition type for a WorkflowRun

Variables

View Source
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
)
View Source
var (
	WorkflowKind             = "Workflow"
	WorkflowGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowKind)
)

Workflow meta

View Source
var (
	WorkflowRunKind             = "WorkflowRun"
	WorkflowRunGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowRunKind)
)

WorkflowRun meta

Functions

This section is empty.

Types

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 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

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         *oamv1alpha1.WorkflowExecuteMode `json:"mode,omitempty"`
	WorkflowSpec *oamv1alpha1.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    oamv1alpha1.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 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"
	// WorkflowStepPhaseSuspending will make the controller suspend the workflow.
	WorkflowStepPhaseSuspending WorkflowStepPhase = "suspending"
)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL