v1

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package v1 contains API Schema definitions for the cluster v1 API group +kubebuilder:object:generate=true +groupName=cluster.kubecube.io

Index

Constants

This section is empty.

Variables

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

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

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

Functions

This section is empty.

Types

type Cluster

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

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

type ClusterList

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

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

type ClusterSpec

type ClusterSpec struct {
	// KubeConfig contains cluster raw kubeConfig
	KubeConfig []byte `json:"kubeconfig,omitempty"`

	// Kubernetes API Server endpoint. Example: https://10.10.0.1:6443
	KubernetesAPIEndpoint string `json:"kubernetesAPIEndpoint,omitempty"`

	// cluster is member or not
	IsMemberCluster bool `json:"isMemberCluster,omitempty"`

	// describe cluster
	// +optional
	Description string `json:"description,omitempty"`

	// harbor address for cluster
	// +optional
	HarborAddr string `json:"harborAddr,omitempty"`

	// CNI the cluster used
	// +optional
	NetworkType string `json:"networkType,omitempty"`

	// let ingress gets a domain suffix
	// +optional
	IngressDomainSuffix string `json:"ingressDomainSuffix,omitempty"`

	// Is this cluster writable and if true then some resources such as workloads can be deployed on this cluster
	IsWritable bool `json:"isWritable"`
}

ClusterSpec defines the desired state of Cluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterState

type ClusterState string
const (
	// ClusterInitFailed happened when init cluster failed
	// generally when network error occurred
	ClusterInitFailed ClusterState = "initFailed"

	// ClusterReconnectedFailed happened when kubecube retry connect
	// with member cluster exceed, in that state, user can delete
	// cluster or reconnect manually
	ClusterReconnectedFailed ClusterState = "reconnectedFailed"

	// ClusterProcessing wait for cluster be taken over
	ClusterProcessing ClusterState = "processing"

	// ClusterDeleting means cluster is under deleting
	ClusterDeleting ClusterState = "deleting"

	// ClusterNormal represent cluster is healthy
	ClusterNormal ClusterState = "normal"

	// ClusterAbnormal represent cluster is unhealthy
	ClusterAbnormal ClusterState = "abnormal"
)

type ClusterStatus

type ClusterStatus struct {
	State         *ClusterState `json:"state,omitempty"`
	Reason        string        `json:"reason,omitempty"`
	LastHeartbeat *metav1.Time  `json:"lastHeartbeat,omitempty"`
}

ClusterStatus defines the observed state of Cluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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