v1

package
v0.0.0-...-ff55af6 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package v1 contains API Schema definitions for the ecs v1 API group +k8s:deepcopy-gen=package,register +groupName=ecs.yun.com

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: ecs.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Addons

type Addons struct {
}

Addons are some of the applications that need to be pre-installed in the Cluster

func (*Addons) DeepCopy

func (in *Addons) DeepCopy() *Addons

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

func (*Addons) DeepCopyInto

func (in *Addons) DeepCopyInto(out *Addons)

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

type AuthConfig

type AuthConfig struct {
	// Username
	Username string `json:"username,omitempty"`

	// Password
	Password string `json:"password,omitempty"`

	// PrivateSSHKey, use base64 encode
	PrivateSSHKey string `json:"privateSSHKey,omitempty"`
}

AuthConfig defines the nodes peer authentication

func (*AuthConfig) DeepCopy

func (in *AuthConfig) DeepCopy() *AuthConfig

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

func (*AuthConfig) DeepCopyInto

func (in *AuthConfig) DeepCopyInto(out *AuthConfig)

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

type Cluster

type Cluster struct {
	TimeoutMins string `json:"timeout_mins,omitempty"`

	// ClusterType is a specified cluster,eg: kubernetes,kubeedge
	ClusterType ClusterType `json:"clusterType,omitempty"`

	// DeployMode is a cluster deploy mode,contains binary and container two modes.
	DeployMode DeployMode `json:"deployMode,omitempty"`

	// PodCIDR
	PodCIDR string `json:"podCIDR,omitempty"`

	// ServiceCIDR is apiserver and controller-manager flag `--service-cluster-ip-range`
	ServiceCIDR string `json:"serviceCIDR,omitempty"`

	// MasterList
	MasterList []Node `json:"masterList" tag:"required"`

	// ExternalLoadBalancer is a vip by lvs,haproxy or etc
	ExternalLoadBalancer string `json:"externalLoadBalancer,omitempty"`

	// NodeList
	NodeList []Node `json:"nodeList" tag:"required"`

	// EtcdList
	EtcdList []Node `json:"etcdList,omitempty"`

	// Region
	Region string `json:"region,omitempty"`

	// login destination host used authConfig
	AuthConfig AuthConfig `json:"authConfig,omitempty"`

	// kubernetes version
	KubeVersion string `json:"kubeVersion"`

	// ImagesRegistry, default "registry.cn-hangzhou.aliyuncs.com/aliyun_kube_system"
	ImagesRegistry string `json:"imagesRegistry"`
}

Cluster xxx

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.

type ClusterType

type ClusterType string

ClusterType is a specified cluster,eg: kubernetes,k3s,kind...

const (
	// KubernetesClusterType
	KubernetesClusterType ClusterType = "kubernetes"

	// K3sClusterType
	K3sClusterType ClusterType = "k3s"

	// kubeedge
	KubeedgeClusterType ClusterType = "kubeedge"

	// kind
	KindClusterType ClusterType = "kind"
)

type DeployMode

type DeployMode string

DeployMode is a cluster deploy mode,contains binary and container two modes, binary mode is use k8s binary and config directorly deploy, container mode is user kubeadm deploy.

const (
	// BinaryDeployMode
	BinaryDeployMode DeployMode = "binary"

	// ContainerDeployMode
	ContainerDeployMode DeployMode = "container"
)

type KubernetesCluster

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

	Spec   KubernetesClusterSpec   `json:"spec,omitempty"`
	Status KubernetesClusterStatus `json:"status,omitempty"`
}

KubernetesCluster is the Schema for the kubernetesclusters API

note: if you chenaged ecsv1.KubernetesCluster and you must update installerv1.KubernetesClusterRequest ecsv1.KubernetesCluster and installerv1.KubernetesClusterRequest are related

func (*KubernetesCluster) DeepCopy

func (in *KubernetesCluster) DeepCopy() *KubernetesCluster

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

func (*KubernetesCluster) DeepCopyInto

func (in *KubernetesCluster) DeepCopyInto(out *KubernetesCluster)

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

func (*KubernetesCluster) DeepCopyObject

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

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

type KubernetesClusterList

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

KubernetesClusterList contains a list of KubernetesCluster

func (*KubernetesClusterList) DeepCopy

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

func (*KubernetesClusterList) DeepCopyInto

func (in *KubernetesClusterList) DeepCopyInto(out *KubernetesClusterList)

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

func (*KubernetesClusterList) DeepCopyObject

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

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

type KubernetesClusterSpec

type KubernetesClusterSpec struct {
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	Cluster Cluster `json:"cluster,omitempty"`

	// Addons are some of the applications that need to be pre-installed in the cluster,eg: helm,promethus,logpolit...
	Addons Addons `json:"addons,omitempty"`
}

KubernetesClusterSpec defines the desired state of KubernetesCluster

func (*KubernetesClusterSpec) DeepCopy

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

func (*KubernetesClusterSpec) DeepCopyInto

func (in *KubernetesClusterSpec) DeepCopyInto(out *KubernetesClusterSpec)

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

type KubernetesClusterStatus

type KubernetesClusterStatus struct {
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	Phase KubernetesOperatorPhase `json:"phase,omitempty"`

	// when job failed callback or job timeout used
	Reason string `json:"reason,omitempty"`

	// JobName is store each job name
	JobName string `json:"jobName,omitempty"`

	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

KubernetesClusterStatus defines the observed state of KubernetesCluster

func (*KubernetesClusterStatus) DeepCopy

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

func (*KubernetesClusterStatus) DeepCopyInto

func (in *KubernetesClusterStatus) DeepCopyInto(out *KubernetesClusterStatus)

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

type KubernetesOperatorPhase

type KubernetesOperatorPhase string

"None,Creating,Running,Failed,Scaling"

type Node

type Node struct {
	// IP
	IP string `json:"ip,omitempty"`

	// Role is used in kubeadm installer
	Role NodeRole `json:"role:omitempty"`
}

Node xxx

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

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

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

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

type NodeRole

type NodeRole string

NodeRole defines possible role for nodes in a Kubernetes cluster managed by `kind`

const (
	// ControlPlaneRole identifies a node that hosts a Kubernetes control-plane.
	// NOTE: in single node clusters, control-plane nodes act also as a worker
	// nodes, in which case the taint will be removed. see:
	// https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#control-plane-node-isolation
	ControlPlaneRole NodeRole = "control-plane"

	SecondaryControlPlaneRole NodeRole = "secondary-control-plane"

	// WorkerRole identifies a node that hosts a Kubernetes worker
	WorkerRole NodeRole = "worker"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL