v1

package
v0.0.0-...-6b6aee0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=hhstu.github.com

Index

Constants

View Source
const (
	Installing    ClusterAction = "installing"
	UnInstalling  ClusterAction = "unInstalling"
	Installed     ClusterAction = "installed"
	InstallFailed ClusterAction = "installFailed"

	DefaultCriType            = CriTypeContainerd
	CriTypeDocker     CriType = "docker"
	CriTypeContainerd CriType = "containerd"

	DefaultWorkDir string = "/var/lib"
)
View Source
const (
	// NetworkTypeCalico uses calico as network plugin
	NetworkTypeCalico = "calico"
	// NetworkTypeCalicoTypha uses calico-typha as network plugin
	NetworkTypeCalicoTypha = "calico-typha"
)
View Source
const ClusterCrd = `` /* 886-byte string literal not displayed */

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "hhstu.github.com", 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 CalicoIPIPMode

type CalicoIPIPMode string

CalicoIPIPMode identifies calico ipip mode.

const (
	// CalicoIPIPModeAlways enable ipip always
	CalicoIPIPModeAlways CalicoIPIPMode = "always"

	// CalicoIPIPModeOff disable ipip
	CalicoIPIPModeOff CalicoIPIPMode = "off"

	// CalicoIPIPModeCrossSubnet only when cross subnet
	CalicoIPIPModeCrossSubnet CalicoIPIPMode = "crosssubnet"
)

type Cluster

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

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

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient:nonNamespaced

func (*Cluster) Check

func (c *Cluster) Check() error

func (*Cluster) CheckInstall

func (c *Cluster) CheckInstall() error

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) GetAccessIp

func (c *Cluster) GetAccessIp() string

func (*Cluster) GetClusterIps

func (c *Cluster) GetClusterIps() []string

func (*Cluster) GetMastersIps

func (c *Cluster) GetMastersIps() []string

func (*Cluster) GetVMNodeByIP

func (c *Cluster) GetVMNodeByIP(ip string) (*VmNode, error)

func (*Cluster) GetWorkersIps

func (c *Cluster) GetWorkersIps() []string

func (*Cluster) IsAutoInstall

func (c *Cluster) IsAutoInstall() bool

func (*Cluster) IsManager

func (c *Cluster) IsManager() bool

type ClusterAction

type ClusterAction string

type ClusterInfo

type ClusterInfo struct {
	CRI        string `json:"cri"`
	K8sVersion string `json:"k8s_version"`
}

func (*ClusterInfo) DeepCopy

func (in *ClusterInfo) DeepCopy() *ClusterInfo

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

func (*ClusterInfo) DeepCopyInto

func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo)

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"`

	Items []Cluster `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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 {
	WorkDir           string          `json:"work_dir"`
	Vip               string          `json:"vip"`
	Cri               Cri             `json:"container_runtime"`
	VipInterface      string          `json:"vip_interface"`
	KubePort          string          `json:"kube_port,omitempty"`
	ChartmuseumUrl    string          `json:"chartmuseum_url" yaml:"chartmuseum_url"`
	RegistryUrl       string          `json:"registry_url" yaml:"registry_url"`
	PipUrl            string          `json:"pip_url" yaml:"pip_url"`
	ExternalRepo      *bool           `json:"external_repo" yaml:"external_repo"`
	InstallPlugins    []string        `json:"install_plugins" yaml:"install_plugins"`
	CertSans          []string        `json:"cert_sans" yaml:"cert_sans"`
	BearerToken       string          `json:"bearer_token,omitempty"`
	KubeConfig        TlsClientConfig `json:"kubeconfig,omitempty"`
	GlobalSSHUsername string          `json:"global_ssh_username" yaml:"global_ssh_username"`
	GlobalSSHPassword string          `json:"global_ssh_password" yaml:"global_ssh_password"`
	NFS               NFS             `json:"nfs" yaml:"nfs"`
	Masters           []*VmNode       `json:"masters"`
	Workers           []*VmNode       `json:"workers"`
	Network           Network
}

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 {
	Action ClusterAction `json:"action"`
}

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

+kubebuilder:validation:Enum="True";"False";"Unknown"

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 the operator can't decide if a resource is in the condition or not.

type ConfigMapKeySelector

type ConfigMapKeySelector struct {
	LocalObjectReference `json:",inline"`
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// +optional
	Key string `json:"key,omitempty"`
}

func (*ConfigMapKeySelector) DeepCopy

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

func (*ConfigMapKeySelector) DeepCopyInto

func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector)

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

type Cri

type Cri struct {
	NeedInstall *bool   `json:"need_install" yaml:"need_install"`
	CriType     CriType `json:"cri_type" yaml:"cri_type"`
}

func (*Cri) DeepCopy

func (in *Cri) DeepCopy() *Cri

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

func (*Cri) DeepCopyInto

func (in *Cri) DeepCopyInto(out *Cri)

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

type CriType

type CriType string

type LocalObjectReference

type LocalObjectReference struct {
	Name string `json:"name"`
}

func (*LocalObjectReference) DeepCopy

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

func (*LocalObjectReference) DeepCopyInto

func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)

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

type NFS

type NFS struct {
	Enable            *bool  `json:"enable" yaml:"enable"`
	ExternalNfsServer string `json:"external_nfs_server" yaml:"external_nfs_server"`
	ExternalNfsPath   string `json:"external_nfs_path" yaml:"external_nfs_path"`
	InternalNfsServer string `json:"internal_nfs_server" yaml:"internal_nfs_server"`
	InternalNfsPath   string `json:"internal_nfs_path" yaml:"internal_nfs_path"`
}

nfs 配置

func (*NFS) DeepCopy

func (in *NFS) DeepCopy() *NFS

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

func (*NFS) DeepCopyInto

func (in *NFS) DeepCopyInto(out *NFS)

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

type Network

type Network struct {
	Type             NetworkType    `json:"type,omitempty" yaml:"type"`
	CalicoIPIP       CalicoIPIPMode `json:"calico_ipip,omitempty" yaml:"calico_ipip"`
	PodCIDR          string         `json:"pod_cidr,omitempty" yaml:"pod_cidr"`
	ServiceCIDR      string         `json:"service_cidr,omitempty" yaml:"service_cidr"`
	ServiceDomain    string         `json:"service_domain,omitempty" yaml:"service_domain"`
	NetworkInterface string         `json:"network_interface" yaml:"network_interface"`
}

Network is cluster network

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

type NetworkType

type NetworkType string

NetworkType identifies the cluster network type.

type ObjectReference

type ObjectReference struct {
	LocalObjectReference `json:",inline"`
	Namespace            string `json:"namespace,omitempty"`
}

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type OptionalConfigMapKeySelector

type OptionalConfigMapKeySelector struct {
	ConfigMapKeySelector `json:",inline"`
	// +optional
	Optional bool `json:"optional,omitempty"`
}

func (*OptionalConfigMapKeySelector) DeepCopy

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

func (*OptionalConfigMapKeySelector) DeepCopyInto

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

type OptionalSecretKeySelector

type OptionalSecretKeySelector struct {
	SecretKeySelector `json:",inline"`
	// +optional
	Optional bool `json:"optional,omitempty"`
}

func (*OptionalSecretKeySelector) DeepCopy

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

func (*OptionalSecretKeySelector) DeepCopyInto

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

type SecretKeySelector

type SecretKeySelector struct {
	LocalObjectReference `json:",inline"`
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// +optional
	Key string `json:"key,omitempty"`
}

func (*SecretKeySelector) DeepCopy

func (in *SecretKeySelector) DeepCopy() *SecretKeySelector

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

func (*SecretKeySelector) DeepCopyInto

func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)

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

type TlsClientConfig

type TlsClientConfig struct {
	Insecure bool   `json:"insecure"`
	CertData string `json:"cert_data"`
	KeyData  string `json:"key_data"`
	CAData   string `json:"ca_data"`
}

func (*TlsClientConfig) DeepCopy

func (in *TlsClientConfig) DeepCopy() *TlsClientConfig

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

func (*TlsClientConfig) DeepCopyInto

func (in *TlsClientConfig) DeepCopyInto(out *TlsClientConfig)

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

type VmNode

type VmNode struct {
	IP       string `json:"ip,omitempty" yaml:"ip"`
	Port     string `json:"port" yaml:"port"`
	Hostname string `json:"hostname,omitempty" yaml:"hostname"`
	User     string `json:"user,omitempty" yaml:"user"`
	Password string `json:"password,omitempty" yaml:"password"`
}

VmNode include node info.

func (*VmNode) DeepCopy

func (in *VmNode) DeepCopy() *VmNode

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

func (*VmNode) DeepCopyInto

func (in *VmNode) DeepCopyInto(out *VmNode)

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