v1alpha1

package
v0.0.0-...-3ae09de Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 10

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 (
	// TaskAnnotationRelativePath is the relative dir of task in project.
	TaskAnnotationRelativePath = "kubesphere.io/rel-path"
)

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 RegisterFieldLabelConversion

func RegisterFieldLabelConversion(scheme *runtime.Scheme) error

RegisterFieldLabelConversion registers a field label conversion function for the Task resource. This function ensures that only supported field labels can be used in field selectors. If an unsupported field label is used, an error is returned.

Types

type LoopResult

type LoopResult struct {
	Item   runtime.RawExtension `json:"item,omitempty"`
	Stdout string               `json:"stdout,omitempty"`
	Stderr string               `json:"stdErr,omitempty"`
	Error  string               `json:"error,omitempty"`
}

func (*LoopResult) DeepCopy

func (in *LoopResult) DeepCopy() *LoopResult

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

func (*LoopResult) DeepCopyInto

func (in *LoopResult) DeepCopyInto(out *LoopResult)

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

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 playbook

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"`
	Error       string       `json:"error,omitempty"`
	LoopResults []LoopResult `json:"loopResults,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"`
	DelegateTo  string   `yaml:"delegate_to,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"`
	RegisterType string `json:"register_type,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