v1alpha1

package
v4.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 is the internal version, should not register in kubernetes +k8s:deepcopy-gen=package,register +groupName=kubekey.kubesphere.io +kubebuilder:skip

Index

Constants

View Source
const (
	// TaskAnnotationRole is the absolute dir of task in project.
	TaskAnnotationRole = "kubesphere.io/role"
)
View Source
const TaskOwnerField = "ownerReferences:pipeline"

TaskOwnerField is the field name of the owner reference in the task. It defined in proxy transport. Not applicable in kube-apiserver.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "kubekey.kubesphere.io", Version: "v1alpha1"}

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

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

Functions

func AddConversionFuncs

func AddConversionFuncs(scheme *runtime.Scheme) error

AddConversionFuncs adds the conversion functions to the given scheme. NOTE: ownerReferences:pipeline is valid in proxy client.

Types

type Module

type Module struct {
	Name string               `json:"name,omitempty"`
	Args runtime.RawExtension `json:"args,omitempty"`
}

Module of Task

func (*Module) DeepCopy

func (in *Module) DeepCopy() *Module

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

func (*Module) DeepCopyInto

func (in *Module) DeepCopyInto(out *Module)

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

type Task

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

	Spec   TaskSpec   `json:"spec,omitempty"`
	Status TaskStatus `json:"status,omitempty"`
}

Task of pipeline

func (*Task) DeepCopy

func (in *Task) DeepCopy() *Task

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

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

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

func (*Task) DeepCopyObject

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

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

func (Task) IsComplete

func (t Task) IsComplete() bool

IsComplete if Task IsSucceed or IsFailed

func (Task) IsFailed

func (t Task) IsFailed() bool

IsFailed Task.Status.Phase is failed when reach the retries

func (Task) IsSucceed

func (t Task) IsSucceed() bool

IsSucceed if Task.Status.Phase TaskPhaseSuccess or TaskPhaseIgnored

type TaskHostResult

type TaskHostResult struct {
	Host   string `json:"host,omitempty"`
	Stdout string `json:"stdout,omitempty"`
	StdErr string `json:"stdErr,omitempty"`
}

TaskHostResult each host result for task

func (*TaskHostResult) DeepCopy

func (in *TaskHostResult) DeepCopy() *TaskHostResult

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

func (*TaskHostResult) DeepCopyInto

func (in *TaskHostResult) DeepCopyInto(out *TaskHostResult)

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

type TaskList

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

TaskList for Task

func (*TaskList) DeepCopy

func (in *TaskList) DeepCopy() *TaskList

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

func (*TaskList) DeepCopyInto

func (in *TaskList) DeepCopyInto(out *TaskList)

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

func (*TaskList) DeepCopyObject

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

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

type TaskPhase

type TaskPhase string

TaskPhase of Task

const (
	// TaskPhasePending of Task. Task has created but not deal
	TaskPhasePending TaskPhase = "Pending"
	// TaskPhaseRunning of Task. deal Task
	TaskPhaseRunning TaskPhase = "Running"
	// TaskPhaseSuccess of Task. Module of Task run success in each hosts.
	TaskPhaseSuccess TaskPhase = "Success"
	// TaskPhaseFailed of Task. once host run failed.
	TaskPhaseFailed TaskPhase = "Failed"
	// TaskPhaseIgnored of Task. once host run failed and set ignore_errors.
	TaskPhaseIgnored TaskPhase = "Ignored"
)

type TaskSpec

type TaskSpec struct {
	Name        string   `json:"name,omitempty"`
	Hosts       []string `json:"hosts,omitempty"`
	IgnoreError *bool    `json:"ignoreError,omitempty"`
	Retries     int      `json:"retries,omitempty"`

	When       []string             `json:"when,omitempty"`
	FailedWhen []string             `json:"failedWhen,omitempty"`
	Loop       runtime.RawExtension `json:"loop,omitempty"`

	Module   Module `json:"module,omitempty"`
	Register string `json:"register,omitempty"`
}

TaskSpec of Task

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

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

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

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

type TaskStatus

type TaskStatus struct {
	RestartCount int              `json:"restartCount,omitempty"`
	Phase        TaskPhase        `json:"phase,omitempty"`
	HostResults  []TaskHostResult `json:"hostResults,omitempty"`
}

TaskStatus of Task

func (*TaskStatus) DeepCopy

func (in *TaskStatus) DeepCopy() *TaskStatus

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

func (*TaskStatus) DeepCopyInto

func (in *TaskStatus) DeepCopyInto(out *TaskStatus)

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