v1

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: 9 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the kubekey v1 API group +k8s:deepcopy-gen=package,register +groupName=kubekey.kubesphere.io

Index

Constants

View Source
const (
	// BuiltinsProjectAnnotation use builtins project of KubeKey
	BuiltinsProjectAnnotation = "kubekey.kubesphere.io/builtins-project"
)

Variables

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

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

This section is empty.

Types

type Config

type Config struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              runtime.RawExtension `json:"spec,omitempty"`
}

Config store global vars for playbook.

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) DeepCopyObject

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

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

func (*Config) GetValue

func (c *Config) GetValue(key string) (any, error)

GetValue by key if key contains "." (a.b), find by the key path (if a:b:value in config.and get value)

func (*Config) SetValue

func (c *Config) SetValue(key string, value any) error

SetValue to config if key contains "." (a.b), will convert map and set value (a:b:value)

type ConfigList

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

ConfigList of Config

func (*ConfigList) DeepCopy

func (in *ConfigList) DeepCopy() *ConfigList

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

func (*ConfigList) DeepCopyInto

func (in *ConfigList) DeepCopyInto(out *ConfigList)

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

func (*ConfigList) DeepCopyObject

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

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

type Inventory

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

	Spec InventorySpec `json:"spec,omitempty"`
}

Inventory store hosts vars for playbook.

func (*Inventory) DeepCopy

func (in *Inventory) DeepCopy() *Inventory

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

func (*Inventory) DeepCopyInto

func (in *Inventory) DeepCopyInto(out *Inventory)

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

func (*Inventory) DeepCopyObject

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

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

type InventoryGroup

type InventoryGroup struct {
	Groups []string             `json:"groups,omitempty"`
	Hosts  []string             `json:"hosts,omitempty"`
	Vars   runtime.RawExtension `json:"vars,omitempty"`
}

InventoryGroup of Inventory

func (*InventoryGroup) DeepCopy

func (in *InventoryGroup) DeepCopy() *InventoryGroup

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

func (*InventoryGroup) DeepCopyInto

func (in *InventoryGroup) DeepCopyInto(out *InventoryGroup)

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

type InventoryHost

type InventoryHost map[string]runtime.RawExtension

InventoryHost of Inventory

func (InventoryHost) DeepCopy

func (in InventoryHost) DeepCopy() InventoryHost

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

func (InventoryHost) DeepCopyInto

func (in InventoryHost) DeepCopyInto(out *InventoryHost)

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

type InventoryList

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

InventoryList of Inventory

func (*InventoryList) DeepCopy

func (in *InventoryList) DeepCopy() *InventoryList

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

func (*InventoryList) DeepCopyInto

func (in *InventoryList) DeepCopyInto(out *InventoryList)

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

func (*InventoryList) DeepCopyObject

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

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

type InventorySpec

type InventorySpec struct {
	// Hosts is all nodes
	Hosts InventoryHost `json:"hosts,omitempty"`
	// Vars for all host. the priority for vars is: host vars > group vars > inventory vars
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	Vars runtime.RawExtension `json:"vars,omitempty"`
	// Groups nodes. a group contains repeated nodes
	// +optional
	Groups map[string]InventoryGroup `json:"groups,omitempty"`
}

InventorySpec of Inventory

func (*InventorySpec) DeepCopy

func (in *InventorySpec) DeepCopy() *InventorySpec

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

func (*InventorySpec) DeepCopyInto

func (in *InventorySpec) DeepCopyInto(out *InventorySpec)

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

type Pipeline

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

	Spec   PipelineSpec   `json:"spec,omitempty"`
	Status PipelineStatus `json:"status,omitempty"`
}

Pipeline resource executor a playbook.

func (*Pipeline) DeepCopy

func (in *Pipeline) DeepCopy() *Pipeline

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

func (*Pipeline) DeepCopyInto

func (in *Pipeline) DeepCopyInto(out *Pipeline)

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

func (*Pipeline) DeepCopyObject

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

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

type PipelineFailedDetail

type PipelineFailedDetail struct {
	// Task name of failed task.
	Task string `json:"task,omitempty"`
	// failed Hosts Result of failed task.
	Hosts []PipelineFailedDetailHost `json:"hosts,omitempty"`
}

PipelineFailedDetail store failed message when pipeline run failed.

func (*PipelineFailedDetail) DeepCopy

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

func (*PipelineFailedDetail) DeepCopyInto

func (in *PipelineFailedDetail) DeepCopyInto(out *PipelineFailedDetail)

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

type PipelineFailedDetailHost

type PipelineFailedDetailHost struct {
	// Host name of failed task.
	Host string `json:"host,omitempty"`
	// Stdout of failed task.
	Stdout string `json:"stdout,omitempty"`
	// StdErr of failed task.
	StdErr string `json:"stdErr,omitempty"`
}

PipelineFailedDetailHost detail failed message for each host.

func (*PipelineFailedDetailHost) DeepCopy

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

func (*PipelineFailedDetailHost) DeepCopyInto

func (in *PipelineFailedDetailHost) DeepCopyInto(out *PipelineFailedDetailHost)

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

type PipelineJobSpec

type PipelineJobSpec struct {
	// when Schedule is not empty, pipeline will create CornJob, otherwise pipeline will create Job.
	// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
	// +optional
	Schedule string `json:"schedule,omitempty"`

	// The number of successful finished jobs to retain. Value must be non-negative integer.
	// Defaults to 3.
	// +optional
	SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"`

	// The number of failed finished jobs to retain. Value must be non-negative integer.
	// Defaults to 1.
	// +optional
	FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"`

	// suspend specifies whether the Job controller should create Pods or not. If
	// a Job is created with suspend set to true, no Pods are created by the Job
	// controller. If a Job is suspended after creation (i.e. the flag goes from
	// false to true), the Job controller will delete all active Pods associated
	// with this Job. Users must design their workload to gracefully handle this.
	// Suspending a Job will reset the StartTime field of the Job, effectively
	// resetting the ActiveDeadlineSeconds timer too. Defaults to false.
	//
	// +optional
	Suspend *bool `json:"suspend,omitempty"`

	// Specifies the duration in seconds relative to the startTime that the job
	// may be continuously active before the system tries to terminate it; value
	// must be positive integer. If a Job is suspended (at creation or through an
	// update), this timer will effectively be stopped and reset when the Job is
	// resumed again.
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`

	// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
	// execution (either Complete or Failed). If this field is set,
	// ttlSecondsAfterFinished after the Job finishes, it is eligible to be
	// automatically deleted. When the Job is being deleted, its lifecycle
	// guarantees (e.g. finalizers) will be honored. If this field is unset,
	// the Job won't be automatically deleted. If this field is set to zero,
	// the Job becomes eligible to be deleted immediately after it finishes.
	// +optional
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`

	// Volumes in job pod.
	// +optional
	Volumes []corev1.Volume `json:"workVolume,omitempty"`

	// VolumeMounts in job pod.
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

PipelineJobSpec set the spec of the job that allows configuration Each time the pipeline is executed, usually only one pod is created and will not be re-executed after failure.

func (*PipelineJobSpec) DeepCopy

func (in *PipelineJobSpec) DeepCopy() *PipelineJobSpec

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

func (*PipelineJobSpec) DeepCopyInto

func (in *PipelineJobSpec) DeepCopyInto(out *PipelineJobSpec)

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

type PipelineList

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

PipelineList of Pipeline

func (*PipelineList) DeepCopy

func (in *PipelineList) DeepCopy() *PipelineList

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

func (*PipelineList) DeepCopyInto

func (in *PipelineList) DeepCopyInto(out *PipelineList)

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

func (*PipelineList) DeepCopyObject

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

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

type PipelinePhase

type PipelinePhase string

PipelinePhase of Pipeline

const (
	// PipelinePhasePending of Pipeline. Pipeline has created but not deal
	PipelinePhasePending PipelinePhase = "Pending"
	// PipelinePhaseRunning of Pipeline. deal Pipeline.
	PipelinePhaseRunning PipelinePhase = "Running"
	// PipelinePhaseFailed of Pipeline. once Task run failed.
	PipelinePhaseFailed PipelinePhase = "Failed"
	// PipelinePhaseSucceed of Pipeline. all Tasks run success.
	PipelinePhaseSucceed PipelinePhase = "Succeed"
)

type PipelineProject

type PipelineProject struct {
	// Addr is the storage for executable packages (in Ansible file format).
	// When starting with http or https, it will be obtained from a Git repository.
	// When starting with file path, it will be obtained from the local path.
	// +optional
	Addr string `json:"addr,omitempty"`
	// Name is the project name base project
	// +optional
	Name string `json:"name,omitempty"`
	// Branch is the git branch of the git Addr.
	// +optional
	Branch string `json:"branch,omitempty"`
	// Tag is the git branch of the git Addr.
	// +optional
	Tag string `json:"tag,omitempty"`
	// InsecureSkipTLS skip tls or not when git addr is https.
	// +optional
	InsecureSkipTLS bool `json:"insecureSkipTLS,omitempty"`
	// Token of Authorization for http request
	// +optional
	Token string `json:"token,omitempty"`
}

PipelineProject respect which playbook store.

func (*PipelineProject) DeepCopy

func (in *PipelineProject) DeepCopy() *PipelineProject

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

func (*PipelineProject) DeepCopyInto

func (in *PipelineProject) DeepCopyInto(out *PipelineProject)

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

type PipelineSpec

type PipelineSpec struct {
	// Project is storage for executable packages
	// +optional
	Project PipelineProject `json:"project,omitempty"`
	// Playbook which to execute.
	Playbook string `json:"playbook"`
	// InventoryRef is the node configuration for playbook
	// +optional
	InventoryRef *corev1.ObjectReference `json:"inventoryRef,omitempty"`
	// ConfigRef is the global variable configuration for playbook
	// +optional
	ConfigRef *corev1.ObjectReference `json:"configRef,omitempty"`
	// Tags is the tags of playbook which to execute
	// +optional
	Tags []string `json:"tags,omitempty"`
	// SkipTags is the tags of playbook which skip execute
	// +optional
	SkipTags []string `json:"skipTags,omitempty"`
	// If Debug mode is true, It will retain runtime data after a successful execution of Pipeline,
	// which includes task execution status and parameters.
	// +optional
	Debug bool `json:"debug,omitempty"`
	// when execute in kubernetes, pipeline will create ob or cornJob to execute.
	// +optional
	JobSpec PipelineJobSpec `json:"jobSpec,omitempty"`
}

PipelineSpec of pipeline.

func (*PipelineSpec) DeepCopy

func (in *PipelineSpec) DeepCopy() *PipelineSpec

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

func (*PipelineSpec) DeepCopyInto

func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec)

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

type PipelineStatus

type PipelineStatus struct {
	// TaskResult total related tasks execute result.
	TaskResult PipelineTaskResult `json:"taskResult,omitempty"`
	// Phase of pipeline.
	Phase PipelinePhase `json:"phase,omitempty"`
	// failed Reason of pipeline.
	Reason string `json:"reason,omitempty"`
	// FailedDetail will record the failed tasks.
	FailedDetail []PipelineFailedDetail `json:"failedDetail,omitempty"`
}

PipelineStatus of Pipeline

func (*PipelineStatus) DeepCopy

func (in *PipelineStatus) DeepCopy() *PipelineStatus

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

func (*PipelineStatus) DeepCopyInto

func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus)

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

type PipelineTaskResult

type PipelineTaskResult struct {
	// Total number of tasks.
	Total int `json:"total,omitempty"`
	// Success number of tasks.
	Success int `json:"success,omitempty"`
	// Failed number of tasks.
	Failed int `json:"failed,omitempty"`
	// Ignored number of tasks.
	Ignored int `json:"ignored,omitempty"`
}

PipelineTaskResult of Pipeline

func (*PipelineTaskResult) DeepCopy

func (in *PipelineTaskResult) DeepCopy() *PipelineTaskResult

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

func (*PipelineTaskResult) DeepCopyInto

func (in *PipelineTaskResult) DeepCopyInto(out *PipelineTaskResult)

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