v1alpha1

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +groupName=kubean.io

Index

Constants

View Source
const GroupName = "kubean.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ActionSource

type ActionSource string
const (
	BuiltinActionSource   ActionSource = "builtin"
	ConfigMapActionSource ActionSource = "configmap"
)

type ActionType

type ActionType string
const (
	PlaybookActionType ActionType = "playbook"
	ShellActionType    ActionType = "shell"
)

type ClusterOperation

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

	// +required
	Spec Spec `json:"spec"`

	// +optional
	Status Status `json:"status,omitempty"`
}

ClusterOperation represents the desire state and status of a member cluster.

func (*ClusterOperation) DeepCopy

func (in *ClusterOperation) DeepCopy() *ClusterOperation

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

func (*ClusterOperation) DeepCopyInto

func (in *ClusterOperation) DeepCopyInto(out *ClusterOperation)

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

func (*ClusterOperation) DeepCopyObject

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

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

type ClusterOperationList

type ClusterOperationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items holds a list of ClusterOperation.
	Items []ClusterOperation `json:"items"`
}

ClusterOperationList contains a list of member cluster.

func (*ClusterOperationList) DeepCopy

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

func (*ClusterOperationList) DeepCopyInto

func (in *ClusterOperationList) DeepCopyInto(out *ClusterOperationList)

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

func (*ClusterOperationList) DeepCopyObject

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

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

type HookAction

type HookAction struct {
	// +required
	ActionType ActionType `json:"actionType"`
	// +required
	Action string `json:"action"`
	// +optional
	// +kubebuilder:default="builtin"
	ActionSource *ActionSource `json:"actionSource"`
	// +optional
	ActionSourceRef *apis.ConfigMapRef `json:"actionSourceRef,omitempty"`
	// +optional
	ExtraArgs string `json:"extraArgs"`
}

func (*HookAction) DeepCopy

func (in *HookAction) DeepCopy() *HookAction

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

func (*HookAction) DeepCopyInto

func (in *HookAction) DeepCopyInto(out *HookAction)

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

type OpsStatus

type OpsStatus string
const (
	RunningStatus   OpsStatus = "Running"
	SucceededStatus OpsStatus = "Succeeded"
	FailedStatus    OpsStatus = "Failed"
)

type Spec

type Spec struct {
	// Cluster the name of Cluster.kubean.io.
	// +required
	Cluster string `json:"cluster"`
	// HostsConfRef will be filled by operator when it performs backup.
	// +optional
	HostsConfRef *apis.ConfigMapRef `json:"hostsConfRef"`
	// VarsConfRef will be filled by operator when it performs backup.
	// +optional
	VarsConfRef *apis.ConfigMapRef `json:"varsConfRef,omitempty"`
	// SSHAuthRef will be filled by operator when it performs backup.
	// +optional
	SSHAuthRef *apis.SecretRef `json:"sshAuthRef,omitempty"`
	// +optional
	// EntrypointSHRef will be filled by operator when it renders entrypoint.sh.
	EntrypointSHRef *apis.ConfigMapRef `json:"entrypointSHRef,omitempty"`
	// +required
	ActionType ActionType `json:"actionType"`
	// +required
	Action string `json:"action"`
	// +optional
	// +kubebuilder:default="builtin"
	ActionSource *ActionSource `json:"actionSource"`
	// +optional
	ActionSourceRef *apis.ConfigMapRef `json:"actionSourceRef,omitempty"`
	// +optional
	ExtraArgs string `json:"extraArgs"`
	// +required
	Image string `json:"image"`
	// +optional
	PreHook []HookAction `json:"preHook"`
	// +optional
	PostHook []HookAction `json:"postHook"`
	// +optional
	Resources corev1.ResourceRequirements `json:"resources"`
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
}

Spec defines the desired state of a member cluster.

func (*Spec) ConfigDataList added in v0.8.2

func (spec *Spec) ConfigDataList() []*apis.ConfigMapRef

func (*Spec) DeepCopy

func (in *Spec) DeepCopy() *Spec

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

func (*Spec) DeepCopyInto

func (in *Spec) DeepCopyInto(out *Spec)

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

func (*Spec) SecretDataList added in v0.8.2

func (spec *Spec) SecretDataList() []*apis.SecretRef

type Status

type Status struct {
	// +optional
	Action string `json:"action"`
	// +optional
	JobRef *apis.JobRef `json:"jobRef,omitempty"`
	// +optional
	Status OpsStatus `json:"status"`
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`
	// +optional
	EndTime *metav1.Time `json:"endTime,omitempty"`
	// Digest is used to avoid the change of clusterOps by others. it will be filled by operator. Do Not change this value.
	// +optional
	Digest string `json:"digest,omitempty"`
	// HasModified indicates the spec has been modified by others after created.
	// +optional
	HasModified bool `json:"hasModified,omitempty"`
}

Status contains information about the current status of a cluster operation job updated periodically by cluster controller.

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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