Documentation
¶
Overview ¶
Package v1 is the v1 version of the API. +groupName=hhstu.github.com
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type CalicoIPIPMode
- type Cluster
- func (c *Cluster) Check() error
- func (c *Cluster) CheckInstall() error
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (c *Cluster) GetAccessIp() string
- func (c *Cluster) GetClusterIps() []string
- func (c *Cluster) GetMastersIps() []string
- func (c *Cluster) GetVMNodeByIP(ip string) (*VmNode, error)
- func (c *Cluster) GetWorkersIps() []string
- func (c *Cluster) IsAutoInstall() bool
- func (c *Cluster) IsManager() bool
- type ClusterAction
- type ClusterInfo
- type ClusterList
- type ClusterSpec
- type ClusterStatus
- type ConditionStatus
- type ConfigMapKeySelector
- type Cri
- type CriType
- type LocalObjectReference
- type NFS
- type Network
- type NetworkType
- type ObjectReference
- type OptionalConfigMapKeySelector
- type OptionalSecretKeySelector
- type SecretKeySelector
- type TlsClientConfig
- type VmNode
Constants ¶
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" )
const ( // NetworkTypeCalico uses calico as network plugin NetworkTypeCalico = "calico" // NetworkTypeCalicoTypha uses calico-typha as network plugin NetworkTypeCalicoTypha = "calico-typha" )
const ClusterCrd = `` /* 886-byte string literal not displayed */
Variables ¶
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 )
var SchemeGroupVersion = schema.GroupVersion{Group: "hhstu.github.com", Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
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) CheckInstall ¶
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetAccessIp ¶
func (*Cluster) GetClusterIps ¶
func (*Cluster) GetMastersIps ¶
func (*Cluster) GetWorkersIps ¶
func (*Cluster) IsAutoInstall ¶
type ClusterAction ¶
type ClusterAction string
type ClusterInfo ¶
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 ¶
func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cri.
func (*Cri) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalObjectReference ¶
type LocalObjectReference struct {
Name string `json:"name"`
}
func (*LocalObjectReference) DeepCopy ¶
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFS.
func (*NFS) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
func (in *OptionalConfigMapKeySelector) DeepCopy() *OptionalConfigMapKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalConfigMapKeySelector.
func (*OptionalConfigMapKeySelector) DeepCopyInto ¶
func (in *OptionalConfigMapKeySelector) DeepCopyInto(out *OptionalConfigMapKeySelector)
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 ¶
func (in *OptionalSecretKeySelector) DeepCopy() *OptionalSecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalSecretKeySelector.
func (*OptionalSecretKeySelector) DeepCopyInto ¶
func (in *OptionalSecretKeySelector) DeepCopyInto(out *OptionalSecretKeySelector)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VmNode.
func (*VmNode) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.