v1alpha1

package
v0.0.0-...-55654f1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sky v1alpha1 API group +kubebuilder:object:generate=true +groupName=sky.my.domain

Index

Constants

View Source
const (
	KindName = "workflow"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "sky.my.domain", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Input

type Input struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Output

type Output struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type Step

type Step struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName,omitempty"`
	Description string `json:"description,omitempty"`
	Image       string `json:"image"`
	Script      string `json:"script"`
	Args        string `json:"args,omitempty"`
}

type Task

type Task struct {
	Name         string           `json:"name"`
	DisplayName  string           `json:"displayName,omitempty"`
	Description  string           `json:"description,omitempty"`
	Dependencies []string         `json:"dependencies,omitempty"`
	Outputs      []TaskOutput     `json:"outputs,omitempty"`
	Timeout      *metav1.Duration `json:"timeout,omitempty"`
	Steps        []Step           `json:"steps"`
}

func (*Task) GetTimeout

func (t *Task) GetTimeout() time.Duration

type TaskOutput

type TaskOutput struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type TaskStatus

type TaskStatus struct {
	Name           string       `json:"name"`
	PodName        string       `json:"podName"`
	Message        string       `json:"message,omitempty"`
	Status         v1.PodPhase  `json:"status"`
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
	Outputs        []*Output    `json:"outputs,omitempty"`
}

type WorkStatus

type WorkStatus string
const (
	WorkFlowStatusWaiting WorkStatus = "Waiting"
	WorkFlowStatusRunning WorkStatus = "Running"
	WorkFlowStatusSuccess WorkStatus = "Success"
	WorkFlowStatusFailed  WorkStatus = "Failed"
	WorkFlowStatusCancel  WorkStatus = "Cancel"
	WorkFlowStatusPause   WorkStatus = "Pause"
)

type Workflow

type Workflow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WorkflowSpec   `json:"spec,omitempty"`
	Status WorkflowStatus `json:"status,omitempty"`
}

Workflow is the Schema for the workflows API

func (*Workflow) DeepCopy

func (in *Workflow) DeepCopy() *Workflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.

func (*Workflow) DeepCopyInto

func (in *Workflow) DeepCopyInto(out *Workflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Workflow) DeepCopyObject

func (in *Workflow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Workflow) ValidateUniqueTaskNames

func (w *Workflow) ValidateUniqueTaskNames() bool

type WorkflowList

type WorkflowList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workflow `json:"items"`
}

WorkflowList contains a list of Workflow

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 {
	Inputs []Input `json:"inputs,omitempty"`
	Tasks  []Task  `json:"tasks"`
}

WorkflowSpec defines the desired state of Workflow

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 {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Status         WorkStatus            `json:"status"`
	Message        string                `json:"message,omitempty"`
	StartTime      *metav1.Time          `json:"startTime,omitempty"`
	CompletionTime *metav1.Time          `json:"completionTime,omitempty"`
	TaskStatus     map[string]TaskStatus `json:"taskStatus,omitempty"`
}

WorkflowStatus defines the observed state 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.

Jump to

Keyboard shortcuts

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