v1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// Upgrade nodes automatically.
	UpgradeModeAuto = UpgradeMode("Auto")
	// Manual upgrade nodes which means user need label node with `platform.k8s.io/need-upgrade`.
	UpgradeModeManual = UpgradeMode("Manual")
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "devops.k8s.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 AddressType

type AddressType string

AddressType indicates the type of cluster apiserver access address.

const (
	// AddressPublic indicates the address of the apiserver accessed from the external network.(such as public lb)
	AddressPublic AddressType = "Public"
	// AddressAdvertise indicates the address of the apiserver accessed from the worker node.(such as internal lb)
	AddressAdvertise AddressType = "Advertise"
	// AddressReal indicates the real address of one apiserver
	AddressReal AddressType = "Real"
	// AddressInternal indicates the address of the apiserver accessed from TKE control plane.
	AddressInternal AddressType = "Internal"
	// AddressSupport used for vpc lb which bind to JNS gateway as known AddressInternal
	AddressSupport AddressType = "Support"
)

These are valid address type of cluster.

type CRIType

type CRIType string

RuntimeType defines the runtime of Container.

const (
	DockerCRI     CRIType = "docker"
	ContainerdCRI CRIType = "containerd"
)

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 Cluster API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=vc +kubebuilder:printcolumn:name="DNSIP",type="string",JSONPath=".status.dnsIP",description="The cluster dnsIP." +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".status..version",description="The version of kubernetes." +kubebuilder:printcolumn:name="PHASE",type="string",JSONPath=".status.phase",description="The cluter phase." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. "

func (*Cluster) AddAddress

func (in *Cluster) AddAddress(addrType AddressType, host string, port int32)

func (*Cluster) Address

func (in *Cluster) Address(addrType AddressType) *ClusterAddress

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.

func (*Cluster) Host

func (in *Cluster) Host() (string, error)

func (*Cluster) RemoveAddress

func (in *Cluster) RemoveAddress(addrType AddressType)

func (*Cluster) SetCondition

func (in *Cluster) SetCondition(newCondition ClusterCondition)

type ClusterAddress

type ClusterAddress struct {
	// Cluster address type, one of Public, ExternalIP or InternalIP.
	Type AddressType `json:"type"`
	// The cluster address.
	Host string `json:"host"`
	Port int32  `json:"port"`
}

ClusterAddress contains information for the cluster's address.

func (*ClusterAddress) DeepCopy

func (in *ClusterAddress) DeepCopy() *ClusterAddress

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

func (*ClusterAddress) DeepCopyInto

func (in *ClusterAddress) DeepCopyInto(out *ClusterAddress)

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

type ClusterComponent

type ClusterComponent struct {
	Type     string                   `json:"type"`
	Replicas ClusterComponentReplicas `json:"replicas"`
}

ClusterComponent records the number of copies of each component of the cluster master.

func (*ClusterComponent) DeepCopy

func (in *ClusterComponent) DeepCopy() *ClusterComponent

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

func (*ClusterComponent) DeepCopyInto

func (in *ClusterComponent) DeepCopyInto(out *ClusterComponent)

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

type ClusterComponentReplicas

type ClusterComponentReplicas struct {
	Desired   int32 `json:"desired"`
	Current   int32 `json:"current"`
	Available int32 `json:"available"`
	Updated   int32 `json:"updated"`
}

ClusterComponentReplicas records the number of copies of each state of each component of the cluster master.

func (*ClusterComponentReplicas) DeepCopy

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

func (*ClusterComponentReplicas) DeepCopyInto

func (in *ClusterComponentReplicas) DeepCopyInto(out *ClusterComponentReplicas)

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

type ClusterCondition

type ClusterCondition struct {
	// Type is the type of the condition.
	Type string `json:"type"`
	// Status is the status of the condition.
	// Can be True, False, Unknown.
	Status ConditionStatus `json:"status"`
	// Last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Unique, one-word, CamelCase reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

ClusterCondition contains details for the current condition of this cluster.

func (*ClusterCondition) DeepCopy

func (in *ClusterCondition) DeepCopy() *ClusterCondition

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

func (*ClusterCondition) DeepCopyInto

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

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

type ClusterCredential

type ClusterCredential struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	CredentialInfo `json:",inline"`
}

ClusterCredential records the credential information needed to access the cluster.

func (*ClusterCredential) DeepCopy

func (in *ClusterCredential) DeepCopy() *ClusterCredential

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

func (*ClusterCredential) DeepCopyInto

func (in *ClusterCredential) DeepCopyInto(out *ClusterCredential)

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

func (*ClusterCredential) DeepCopyObject

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

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

type ClusterCredentialList

type ClusterCredentialList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// List of clusters
	Items []ClusterCredential `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ClusterCredentialList is the whole list of all ClusterCredential which owned by a tenant.

func (*ClusterCredentialList) DeepCopy

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

func (*ClusterCredentialList) DeepCopyInto

func (in *ClusterCredentialList) DeepCopyInto(out *ClusterCredentialList)

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

func (*ClusterCredentialList) DeepCopyObject

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

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

type ClusterFeature

type ClusterFeature struct {
	// +optional
	IPVS *bool `json:"ipvs,omitempty"`
	// +optional
	PublicLB *bool `json:"publicLB,omitempty"`
	// +optional
	InternalLB *bool `json:"internalLB,omitempty" `
	// +optional
	GPUType *GPUType `json:"gpuType,omitempty"`
	// +optional
	EnableMasterSchedule bool `json:"enableMasterSchedule,omitempty"`
	// +optional
	HA *HA `json:"ha,omitempty"`
	// +optional
	SkipConditions []string `json:"skipConditions,omitempty"`
	// +optional
	Files []File `json:"files,omitempty"`
	// +optional
	Hooks map[HookType]string `json:"hooks,omitempty"`
	// +optional
	IPv6DualStack bool `json:"ipv6DualStack,omitempty"`
	// Upgrade control upgrade process.
	// +optional
	Upgrade Upgrade `json:"upgrade,omitempty"`
}

ClusterFeature records the features that are enabled by the cluster.

func (*ClusterFeature) DeepCopy

func (in *ClusterFeature) DeepCopy() *ClusterFeature

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

func (*ClusterFeature) DeepCopyInto

func (in *ClusterFeature) DeepCopyInto(out *ClusterFeature)

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

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 ClusterMachine

type ClusterMachine struct {
	IP       string `json:"ip"`
	Port     int32  `json:"port"`
	Username string `json:"username"`
	// +optional
	Password string `json:"password,omitempty"`
	// +optional
	PrivateKey []byte `json:"privateKey,omitempty"`
	// +optional
	PassPhrase []byte `json:"passPhrase,omitempty"`
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// If specified, the node's taints.
	// +optional
	Taints []corev1.Taint `json:"taints,omitempty"`
}

ClusterMachine is the master machine definition of cluster.

func (*ClusterMachine) DeepCopy

func (in *ClusterMachine) DeepCopy() *ClusterMachine

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

func (*ClusterMachine) DeepCopyInto

func (in *ClusterMachine) DeepCopyInto(out *ClusterMachine)

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

func (*ClusterMachine) SSH

func (in *ClusterMachine) SSH() (*ssh.SSH, error)

type ClusterPhase

type ClusterPhase string

ClusterPhase defines the phase of cluster constructor.

const (
	// ClusterRunning is the normal running phase.
	ClusterRunning ClusterPhase = "Running"
	// ClusterInitializing is the initialize phase.
	ClusterInitializing ClusterPhase = "Initializing"
	// ClusterFailed is the failed phase.
	ClusterFailed ClusterPhase = "Failed"
	// ClusterTerminating means the cluster is undergoing graceful termination.
	ClusterTerminating ClusterPhase = "Terminating"
	// ClusterNotSupport is the not support phase.
	ClusterNotSupport ClusterPhase = "NotSupport"
)

type ClusterProperty

type ClusterProperty struct {
	// +optional
	MaxClusterServiceNum *int32 `json:"maxClusterServiceNum,omitempty"`
	// +optional
	MaxNodePodNum *int32 `json:"maxNodePodNum,omitempty"`
	// +optional
	OversoldRatio map[string]string `json:"oversoldRatio,omitempty"`
}

ClusterProperty records the attribute information of the cluster.

func (*ClusterProperty) DeepCopy

func (in *ClusterProperty) DeepCopy() *ClusterProperty

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

func (*ClusterProperty) DeepCopyInto

func (in *ClusterProperty) DeepCopyInto(out *ClusterProperty)

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

type ClusterResource

type ClusterResource struct {
	// Capacity represents the total resources of a cluster.
	// +optional
	Capacity ResourceList `json:"capacity,omitempty"`
	// Allocatable represents the resources of a cluster that are available for scheduling.
	// Defaults to Capacity.
	// +optional
	Allocatable ResourceList `json:"allocatable,omitempty"`
	// +optional
	Allocated ResourceList `json:"allocated,omitempty"`
}

ClusterResource records the current available and maximum resource quota information for the cluster.

func (*ClusterResource) DeepCopy

func (in *ClusterResource) DeepCopy() *ClusterResource

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

func (*ClusterResource) DeepCopyInto

func (in *ClusterResource) DeepCopyInto(out *ClusterResource)

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

type ClusterSpec

type ClusterSpec struct {
	// Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
	// +optional
	Finalizers []FinalizerName `json:"finalizers,omitempty"`
	TenantID   string          `json:"tenantID"`
	// +optional
	DisplayName string      `json:"displayName,omitempty"`
	ClusterType string      `json:"clusterType,omitempty"`
	OSType      OSType      `json:"osType,omitempty"`
	CRIType     CRIType     `json:"criType,omitempty"`
	NetworkType NetworkType `json:"networkType,omitempty"`
	Version     string      `json:"version,omitempty"`
	// +optional
	NetworkDevice string `json:"networkDevice,omitempty"`
	// +optional
	ClusterCIDR string `json:"clusterCIDR,omitempty"`
	// ServiceCIDR is used to set a separated CIDR for k8s service, it's exclusive with MaxClusterServiceNum.
	// +optional
	ServiceCIDR *string `json:"serviceCIDR,omitempty"`
	// DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local".
	DNSDomain string `json:"dnsDomain,omitempty"`
	// +optional
	PublicAlternativeNames []string `json:"publicAlternativeNames,omitempty"`
	// +optional
	Features ClusterFeature `json:"features,omitempty"`
	// +optional
	Properties ClusterProperty `json:"properties,omitempty"`
	// +optional
	Machines []*ClusterMachine `json:"machines,omitempty"`
	// +optional
	Registry *Registry `json:"registry,omitempty"`
	// +optional
	KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"`
	// +optional
	APIServerExtraArgs map[string]string `json:"apiServerExtraArgs,omitempty"`
	// +optional
	ControllerManagerExtraArgs map[string]string `json:"controllerManagerExtraArgs,omitempty"`
	// +optional
	SchedulerExtraArgs map[string]string `json:"schedulerExtraArgs,omitempty"`
	// Etcd holds configuration for etcd.
	Etcd *Etcd `json:"etcd,omitempty"`
	// Upgrade control upgrade process.
	// +optional
	Upgrade Upgrade `json:"upgrade,omitempty"`
	// +optional
	NetworkArgs map[string]string `json:"networkArgs,omitempty"`
	// +optional
	// Pause
	Pause bool `json:"pause,omitempty"`
}

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 ClusterStatus

type ClusterStatus struct {
	// +optional
	Locked *bool `json:"locked,omitempty"`
	// +optional
	Version string `json:"version"`
	// +optional
	Phase ClusterPhase `json:"phase,omitempty"`
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []ClusterCondition `json:"conditions,omitempty"`
	// A human readable message indicating details about why the cluster is in this condition.
	// +optional
	Message string `json:"message,omitempty"`
	// A brief CamelCase message indicating details about why the cluster is in this state.
	// +optional
	Reason string `json:"reason,omitempty"`
	// List of addresses reachable to the cluster.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Addresses []ClusterAddress `json:"addresses,omitempty"`
	// +optional
	Resource ClusterResource `json:"resource,omitempty"`
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Components []ClusterComponent `json:"components,omitempty"`
	// +optional
	ServiceCIDR string `json:"serviceCIDR,omitempty"`
	// +optional
	NodeCIDRMaskSize int32 `json:"nodeCIDRMaskSize,omitempty" `
	// +optional
	DNSIP string `json:"dnsIP,omitempty"`
	// +optional
	RegistryIPs []string `json:"registryIPs,omitempty"`
	// +optional
	SecondaryServiceCIDR string `json:"secondaryServiceCIDR,omitempty"`
	// +optional
	ClusterCIDR string `json:"clusterCIDR,omitempty"`
	// +optional
	SecondaryClusterCIDR string `json:"secondaryClusterCIDR,omitempty" `
	// +optional
	NodeCIDRMaskSizeIPv4 int32 `json:"nodeCIDRMaskSizeIPv4,omitempty"`
	// +optional
	NodeCIDRMaskSizeIPv6 int32 `json:"nodeCIDRMaskSizeIPv6,omitempty"`
}

ClusterStatus represents information about the status of a 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.

type ConditionStatus

type ConditionStatus string

ConditionStatus defines the status of Condition.

const (
	ConditionTrue    ConditionStatus = "True"
	ConditionFalse   ConditionStatus = "False"
	ConditionUnknown ConditionStatus = "Unknown"
)

These are valid condition statuses. "ConditionTrue" means a resource is in the condition. "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means server can't decide if a resource is in the condition or not.

type CredentialInfo

type CredentialInfo struct {
	TenantID    string `json:"tenantID"`
	ClusterName string `json:"clusterName"`

	// For TKE in global reuse
	// +optional
	ETCDCACert []byte `json:"etcdCACert,omitempty"`
	// +optional
	ETCDCAKey []byte `json:"etcdCAKey,omitempty"`
	// +optional
	ETCDAPIClientCert []byte `json:"etcdAPIClientCert,omitempty"`
	// +optional
	ETCDAPIClientKey []byte `json:"etcdAPIClientKey,omitempty"`

	// For connect the cluster
	// +optional
	CACert []byte `json:"caCert,omitempty"`
	// +optional
	CAKey []byte `json:"caKey,omitempty"`
	// For kube-apiserver X509 auth
	// +optional
	ClientCert []byte `json:"clientCert,omitempty"`
	// For kube-apiserver X509 auth
	// +optional
	ClientKey []byte `json:"clientKey,omitempty"`
	// For kube-apiserver token auth
	// +optional
	Token *string `json:"token,omitempty"`
	// For kubeadm init or join
	// +optional
	BootstrapToken *string `json:"bootstrapToken,omitempty"`
	// For kubeadm init or join
	// +optional
	CertificateKey *string `json:"certificateKey,omitempty"`

	ExtData         map[string]string `json:"extData,omitempty"`
	KubeData        map[string]string `json:"kubeData,omitempty"`
	ManifestsData   map[string]string `json:"manifestsData,omitempty"`
	CertsBinaryData map[string][]byte `json:"certsBinaryData,omitempty"`
}

func (*CredentialInfo) DeepCopy

func (in *CredentialInfo) DeepCopy() *CredentialInfo

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

func (*CredentialInfo) DeepCopyInto

func (in *CredentialInfo) DeepCopyInto(out *CredentialInfo)

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

type Etcd

type Etcd struct {
	// Local provides configuration knobs for configuring the local etcd instance
	// Local and External are mutually exclusive
	Local *LocalEtcd `json:"local,omitempty"`

	// External describes how to connect to an external etcd cluster
	// Local and External are mutually exclusive
	External *ExternalEtcd `json:"external,omitempty"`
}

Etcd contains elements describing Etcd configuration.

func (*Etcd) DeepCopy

func (in *Etcd) DeepCopy() *Etcd

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

func (*Etcd) DeepCopyInto

func (in *Etcd) DeepCopyInto(out *Etcd)

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

type ExternalEtcd

type ExternalEtcd struct {
	// Endpoints of etcd members. Required for ExternalEtcd.
	Endpoints []string `json:"endpoints"`

	// CAFile is an SSL Certificate Authority file used to secure etcd communication.
	// Required if using a TLS connection.
	CAFile string `json:"caFile"`

	// CertFile is an SSL certification file used to secure etcd communication.
	// Required if using a TLS connection.
	CertFile string `json:"certFile"`

	// KeyFile is an SSL key file used to secure etcd communication.
	// Required if using a TLS connection.
	KeyFile string `json:"keyFile"`
}

ExternalEtcd describes an external etcd cluster. Kubeadm has no knowledge of where certificate files live and they must be supplied.

func (*ExternalEtcd) DeepCopy

func (in *ExternalEtcd) DeepCopy() *ExternalEtcd

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

func (*ExternalEtcd) DeepCopyInto

func (in *ExternalEtcd) DeepCopyInto(out *ExternalEtcd)

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

type File

type File struct {
	Src string `json:"src"` // Only support regular file
	Dst string `json:"dst"`
}

func (*File) DeepCopy

func (in *File) DeepCopy() *File

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

func (*File) DeepCopyInto

func (in *File) DeepCopyInto(out *File)

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

type FinalizerName

type FinalizerName string

FinalizerName is the name identifying a finalizer during cluster lifecycle.

const (
	// ClusterFinalize is an internal finalizer values to Cluster.
	ClusterFinalize FinalizerName = "cluster"

	// MachineFinalize is an internal finalizer values to Machine.
	MachineFinalize FinalizerName = "machine"
)

type GPUType

type GPUType string

GPUType defines the gpu type of cluster.

const (
	// GPUPhysical indicates the gpu type of cluster is physical.
	GPUPhysical GPUType = "Physical"
	// GPUVirtual indicates the gpu type of cluster is virtual.
	GPUVirtual GPUType = "Virtual"
)

type HA

type HA struct {
	KubeHA       *KubeHA       `json:"kube,omitempty"`
	ThirdPartyHA *ThirdPartyHA `json:"thirdParty,omitempty"`
}

func (*HA) DeepCopy

func (in *HA) DeepCopy() *HA

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

func (*HA) DeepCopyInto

func (in *HA) DeepCopyInto(out *HA)

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

type HookType

type HookType string

HookType

const (
	HookPreInstall  HookType = "preInstall"
	HookPostInstall HookType = "postInstall"
	HookCniInstall  HookType = "cniInstall"
)

type KubeHA

type KubeHA struct {
	VIP string `json:"vip"`
}

func (*KubeHA) DeepCopy

func (in *KubeHA) DeepCopy() *KubeHA

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

func (*KubeHA) DeepCopyInto

func (in *KubeHA) DeepCopyInto(out *KubeHA)

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

type LocalEtcd

type LocalEtcd struct {
	// DataDir is the directory etcd will place its data.
	// Defaults to "/var/lib/etcd".
	DataDir string `json:"dataDir"`

	// ExtraArgs are extra arguments provided to the etcd binary
	// when run inside a static pod.
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`

	// ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert.
	ServerCertSANs []string `json:"serverCertSANs,omitempty"`
	// PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert.
	PeerCertSANs []string `json:"peerCertSANs,omitempty"`
}

LocalEtcd describes that kubeadm should run an etcd cluster locally

func (*LocalEtcd) DeepCopy

func (in *LocalEtcd) DeepCopy() *LocalEtcd

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

func (*LocalEtcd) DeepCopyInto

func (in *LocalEtcd) DeepCopyInto(out *LocalEtcd)

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

type Machine

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

	Spec   MachineSpec   `json:"spec,omitempty"`
	Status MachineStatus `json:"status,omitempty"`
}

Machine is the Schema for the Machine API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=mc +kubebuilder:printcolumn:name="PHASE",type="string",JSONPath=".status.phase",description="The cluter phase." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. "

func (*Machine) DeepCopy

func (in *Machine) DeepCopy() *Machine

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

func (*Machine) DeepCopyInto

func (in *Machine) DeepCopyInto(out *Machine)

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

func (*Machine) DeepCopyObject

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

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

func (*Machine) SetCondition

func (in *Machine) SetCondition(newCondition MachineCondition)

type MachineAddress

type MachineAddress struct {
	// Machine address type, one of Public, ExternalIP or InternalIP.
	Type MachineAddressType `json:"type"`
	// The machine address.
	Address string `json:"address"`
}

MachineAddress contains information for the machine's address.

func (*MachineAddress) DeepCopy

func (in *MachineAddress) DeepCopy() *MachineAddress

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

func (*MachineAddress) DeepCopyInto

func (in *MachineAddress) DeepCopyInto(out *MachineAddress)

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

type MachineAddressType

type MachineAddressType string

MachineAddressType represents the type of machine address.

const (
	MachineHostName    MachineAddressType = "Hostname"
	MachineExternalIP  MachineAddressType = "ExternalIP"
	MachineInternalIP  MachineAddressType = "InternalIP"
	MachineExternalDNS MachineAddressType = "ExternalDNS"
	MachineInternalDNS MachineAddressType = "InternalDNS"
)

These are valid address type of machine.

type MachineCondition

type MachineCondition struct {
	// Type is the type of the condition.
	Type string `json:"type"`
	// Status is the status of the condition.
	// Can be True, False, Unknown.
	Status ConditionStatus `json:"status"`
	// Last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Unique, one-word, CamelCase reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

MachineCondition contains details for the current condition of this Machine.

func (*MachineCondition) DeepCopy

func (in *MachineCondition) DeepCopy() *MachineCondition

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

func (*MachineCondition) DeepCopyInto

func (in *MachineCondition) DeepCopyInto(out *MachineCondition)

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

type MachineFeature

type MachineFeature struct {
	// +optional
	SkipConditions []string `json:"skipConditions,omitempty"`
	// +optional
	Files []File `json:"files,omitempty"`
	// +optional
	Hooks map[string]string `json:"hooks,omitempty"`
}

func (*MachineFeature) DeepCopy

func (in *MachineFeature) DeepCopy() *MachineFeature

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

func (*MachineFeature) DeepCopyInto

func (in *MachineFeature) DeepCopyInto(out *MachineFeature)

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

type MachineList

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

MachineList contains a list of Machine

func (*MachineList) DeepCopy

func (in *MachineList) DeepCopy() *MachineList

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

func (*MachineList) DeepCopyInto

func (in *MachineList) DeepCopyInto(out *MachineList)

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

func (*MachineList) DeepCopyObject

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

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

type MachinePhase

type MachinePhase string

MachinePhase defines the phase of machine constructor

const (
	// MachineRunning is the normal running phase
	MachineRunning MachinePhase = "Running"
	// MachineInitializing is the initialize phase
	MachineInitializing MachinePhase = "Initializing"
	// MachineFailed is the failed phase
	MachineFailed MachinePhase = "Failed"
	// MachineTerminating is the terminating phase
	MachineTerminating MachinePhase = "Terminating"
)

type MachineSpec

type MachineSpec struct {
	// Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
	// +optional
	Finalizers  []FinalizerName `json:"finalizers,omitempty"`
	TenantID    string          `json:"tenantID,omitempty"`
	ClusterName string          `json:"clusterName"`
	Type        string          `json:"type"`
	Machine     *ClusterMachine `json:"machine,omitempty"`
	Feature     *MachineFeature `json:"feature,omitempty"`
	Pause       bool            `json:"pause,omitempty"`
}

MachineSpec is a description of machine.

func (*MachineSpec) DeepCopy

func (in *MachineSpec) DeepCopy() *MachineSpec

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

func (*MachineSpec) DeepCopyInto

func (in *MachineSpec) DeepCopyInto(out *MachineSpec)

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

func (*MachineSpec) SSH

func (in *MachineSpec) SSH() (*ssh.SSH, error)

type MachineStatus

type MachineStatus struct {
	// +optional
	Locked *bool `json:"locked,omitempty"`
	// +optional
	Phase MachinePhase `json:"phase,omitempty"`
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []MachineCondition `json:"conditions,omitempty"`
	// A human readable message indicating details about why the machine is in this condition.
	// +optional
	Message string `json:"message,omitempty"`
	// A brief CamelCase message indicating details about why the machine is in this state.
	// +optional
	Reason string `json:"reason,omitempty"`
	// List of addresses reachable to the machine.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Addresses []MachineAddress `json:"addresses,omitempty"`
	// Set of ids/uuids to uniquely identify the node.
	// +optional
	MachineInfo MachineSystemInfo `json:"machineInfo,omitempty"`
}

MachineStatus represents information about the status of an machine.

func (*MachineStatus) DeepCopy

func (in *MachineStatus) DeepCopy() *MachineStatus

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

func (*MachineStatus) DeepCopyInto

func (in *MachineStatus) DeepCopyInto(out *MachineStatus)

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

type MachineSystemInfo

type MachineSystemInfo struct {
	// MachineID reported by the node. For unique machine identification
	// in the cluster this field is preferred. Learn more from man(5)
	// machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
	MachineID string `json:"machineID,omitempty"`
	// SystemUUID reported by the node. For unique machine identification
	// MachineID is preferred. This field is specific to Red Hat hosts
	// https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
	SystemUUID string `json:"systemUUID,omitempty"`
	// Boot ID reported by the node.
	BootID string `json:"bootID,omitempty"`
	// Kernel Version reported by the node.
	KernelVersion string `json:"kernelVersion,omitempty"`
	// OS Image reported by the node.
	OSImage string `json:"osImage,omitempty"`
	// ContainerRuntime Version reported by the node.
	ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"`
	// Kubelet Version reported by the node.
	KubeletVersion string `json:"kubeletVersion,omitempty"`
	// KubeProxy Version reported by the node.
	KubeProxyVersion string `json:"kubeProxyVersion,omitempty"`
	// The Operating System reported by the node
	OperatingSystem string `json:"operatingSystem,omitempty"`
	// The Architecture reported by the node
	Architecture string `json:"architecture,omitempty"`
}

MachineSystemInfo is a set of ids/uuids to uniquely identify the node.

func (*MachineSystemInfo) DeepCopy

func (in *MachineSystemInfo) DeepCopy() *MachineSystemInfo

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

func (*MachineSystemInfo) DeepCopyInto

func (in *MachineSystemInfo) DeepCopyInto(out *MachineSystemInfo)

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

type Mirror

type Mirror struct {
	// Endpoints are endpoints for a namespace. CRI plugin will try the endpoints
	// one by one until a working one is found. The endpoint must be a valid url
	// with host specified.
	// The scheme, host and path from the endpoint URL will be used.
	Endpoints []string `json:"endpoint,omitempty"`
}

Mirror contains the config related to the registry mirror

func (*Mirror) DeepCopy

func (in *Mirror) DeepCopy() *Mirror

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

func (*Mirror) DeepCopyInto

func (in *Mirror) DeepCopyInto(out *Mirror)

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

type NetworkType

type NetworkType string

NetworkType defines the network type of cluster.

type OSType

type OSType string

OperatingSystem defines the operating of system.

const (
	CentosType OSType = "centos"
	DebianType OSType = "debian"
	UbuntuType OSType = "ubuntu"
)

type Registry

type Registry struct {
	// Mirrors are namespace to mirror mapping for all namespaces.
	Mirrors map[string]Mirror `json:"mirrors,omitempty"`
}

Registry is registry settings configured

func (*Registry) DeepCopy

func (in *Registry) DeepCopy() *Registry

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

func (*Registry) DeepCopyInto

func (in *Registry) DeepCopyInto(out *Registry)

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

type ResourceList

type ResourceList map[string]resource.Quantity

ResourceList is a set of (resource name, quantity) pairs.

func (ResourceList) DeepCopy

func (in ResourceList) DeepCopy() ResourceList

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

func (ResourceList) DeepCopyInto

func (in ResourceList) DeepCopyInto(out *ResourceList)

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

type ResourceRequirements

type ResourceRequirements struct {
	Limits   ResourceList `json:"limits,omitempty"`
	Requests ResourceList `json:"requests,omitempty"`
}

ResourceRequirements describes the compute resource requirements.

func (*ResourceRequirements) DeepCopy

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

func (*ResourceRequirements) DeepCopyInto

func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)

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

type ThirdPartyHA

type ThirdPartyHA struct {
	VIP   string `json:"vip"`
	VPort int32  `json:"vport"`
}

func (*ThirdPartyHA) DeepCopy

func (in *ThirdPartyHA) DeepCopy() *ThirdPartyHA

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

func (*ThirdPartyHA) DeepCopyInto

func (in *ThirdPartyHA) DeepCopyInto(out *ThirdPartyHA)

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

type Upgrade

type Upgrade struct {
	// Upgrade mode, default value is Auto.
	// +optional
	Mode UpgradeMode `json:"mode,omitempty"`
	// Upgrade strategy config.
	// +optional
	Strategy UpgradeStrategy `json:"strategy,omitempty"`
}

Upgrade

func (*Upgrade) DeepCopy

func (in *Upgrade) DeepCopy() *Upgrade

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

func (*Upgrade) DeepCopyInto

func (in *Upgrade) DeepCopyInto(out *Upgrade)

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

type UpgradeMode

type UpgradeMode string

UpgradeMode

type UpgradeStrategy

type UpgradeStrategy struct {
	// The maximum number of pods that can be unready during the upgrade.
	// 0% means all pods need to be ready after evition.
	// 100% means ignore any pods unready which may be used in one worker node, use this carefully!
	// default value is 0%.
	// +optional
	MaxUnready *intstr.IntOrString `json:"maxUnready,omitempty"`
	// Whether drain node before upgrade.
	// Draining node before upgrade is recommended.
	// But not all pod running as cows, a few running as pets.
	// If your pod can not accept be expelled from current node, this value should be false.
	// +optional
	DrainNodeBeforeUpgrade *bool `json:"drainNodeBeforeUpgrade,omitempty"`
}

UpgradeStrategy used to control the upgrade process.

func (*UpgradeStrategy) DeepCopy

func (in *UpgradeStrategy) DeepCopy() *UpgradeStrategy

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

func (*UpgradeStrategy) DeepCopyInto

func (in *UpgradeStrategy) DeepCopyInto(out *UpgradeStrategy)

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