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 ¶
const (
// TaskAnnotationRelativePath is the relative dir of task in project.
TaskAnnotationRelativePath = "kubesphere.io/rel-path"
)
Variables ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Module.
func (*Module) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Task) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList.
func (*TaskList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TaskList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.
func (*TaskSpec) DeepCopyInto ¶
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.