Documentation ¶
Index ¶
- Constants
- type Cluster
- func (self *Cluster) Delete() error
- func (self *Cluster) DeleteNode(nodeName string) error
- func (self *Cluster) ExistsNode(nodeName string) bool
- func (self *Cluster) FailReason(reason ClusterReason, message string) error
- func (self *Cluster) GetNode(nodeName string) *Node
- func (self *Cluster) NextNodeIndex(role app.ROLE) int
- func (self *Cluster) PutStore() error
- func (self *Cluster) Select() (bool, error)
- func (self *Cluster) UpdatePhase(phase ClusterPhase) error
- type ClusterList
- type ClusterPhase
- type ClusterReason
- type ClusterStatus
- type ListModel
- type Model
- type Node
- type NodeList
Constants ¶
View Source
const ( ClusterPhasePending = ClusterPhase("Pending") ClusterPhaseProvisioning = ClusterPhase("Provisioning") ClusterPhaseProvisioned = ClusterPhase("Provisioned") ClusterPhaseFailed = ClusterPhase("Failed") ClusterPhaseDeleting = ClusterPhase("Deleting") GetMCISFailedReason = ClusterReason("GetMCISFailedReason") AlreadyExistMCISFailedReason = ClusterReason("AlreadyExistMCISFailedReason") InvalidMCIRReason = ClusterReason("InvalidMCIRReason") CreateMCISFailedReason = ClusterReason("CreateMCISFailedReason") GetControlPlaneConnectionInfoFailedReason = ClusterReason("GetControlPlaneConnectionInfoFailedReason") GetWorkerConnectionInfoFailedReason = ClusterReason("GetWorkerConnectionInfoFailedReason") CreateVpcFailedReason = ClusterReason("CreateVpcFailedReason") CreateSecurityGroupFailedReason = ClusterReason("CreateSecurityGroupFailedReason") CreateSSHKeyFailedReason = ClusterReason("CreateSSHKeyFailedReason") CreateVmImageFailedReason = ClusterReason("CreateVmImageFailedReason") CreateVmSpecFailedReason = ClusterReason("CreateVmSpecFailedReason") CreateNLBFailedReason = ClusterReason("CreateNLBFailedReason") AddNodeEntityFailedReason = ClusterReason("AddNodeEntityFailedReason") SetupBoostrapFailedReason = ClusterReason("SetupBoostrapFailedReason") SetupHaproxyFailedReason = ClusterReason("SetupHaproxyFailedReason") InitControlPlaneFailedReason = ClusterReason("InitControlPlaneFailedReason") InitExternalEtcdFailedReason = ClusterReason("InitExternalEtcdFailedReason") SetupNetworkCNIFailedReason = ClusterReason("SetupNetworkCNIFailedReason") SetupStorageClassFailedReason = ClusterReason("SetupStorageClassFailedReason") JoinControlPlaneFailedReason = ClusterReason("JoinControlPlaneFailedReason") JoinWorkerFailedReason = ClusterReason("JoinWorkerFailedReason") SetupCCMFailedReason = ClusterReason("SetupCCMFailedReason") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Model Status ClusterStatus `json:"status"` MCIS string `json:"mcis"` Namespace string `json:"namespace"` Version string `json:"k8sVersion"` ClusterConfig string `json:"clusterConfig"` CpLeader string `json:"cpLeader"` CpGroup string `json:"cpGroup"` NetworkCni app.NetworkCni `json:"networkCni" enums:"canal,kilo"` Label string `json:"label"` InstallMonAgent string `json:"installMonAgent" example:"no" default:"yes"` Loadbalancer app.Loadbalancer `json:"loadbalancer" enums:"haproxy,nlb" example:"haproxy" default:"haproxy"` Etcd app.Etcd `json:"etcd" enums:"local,external" example:"local" default:"local"` Description string `json:"description"` CreatedTime string `json:"createdTime" example:"2022-01-02T12:00:00Z" default:""` ServiceType app.ServiceType `json:"serviceType" enums:"multi,single" default:"multi"` Nodes []*Node `json:"nodes"` }
func NewCluster ¶
new instance of cluster-entity
func (*Cluster) DeleteNode ¶ added in v0.7.2
func (*Cluster) ExistsNode ¶ added in v0.7.2
func (*Cluster) FailReason ¶ added in v0.7.2
func (self *Cluster) FailReason(reason ClusterReason, message string) error
func (*Cluster) NextNodeIndex ¶ added in v0.7.2
func (*Cluster) UpdatePhase ¶ added in v0.7.2
func (self *Cluster) UpdatePhase(phase ClusterPhase) error
cluster-entity
type ClusterList ¶
type ClusterList struct { ListModel Items []Cluster `json:"items"` // contains filtered or unexported fields }
func NewClusterList ¶
func NewClusterList(namespace string) *ClusterList
new instance of cluster-entity list
func (*ClusterList) SelectList ¶
func (self *ClusterList) SelectList() error
type ClusterPhase ¶ added in v0.7.2
type ClusterPhase string
type ClusterReason ¶ added in v0.7.2
type ClusterReason string
type ClusterStatus ¶ added in v0.7.2
type ClusterStatus struct { Phase ClusterPhase `json:"phase" enums:"Pending,Provisioning,Provisioned,Failed"` Reason ClusterReason `json:"reason"` Message string `json:"message"` }
type Node ¶
type Node struct { Model Credential string `json:"credential"` PublicIP string `json:"publicIp"` PrivateIP string `json:"privateIp"` Role app.ROLE `json:"role" enums:"control-plane,worker"` Spec string `json:"spec"` Csp app.CSP `json:"csp" enums:"aws,gcp,azure,alibaba,tencent,openstack,ibm,cloudit,ncp,ncpvpc,nhncloud"` CreatedTime string `json:"createdTime" example:"2022-01-02T12:00:00Z" default:""` CspLabel string `json:"cspLabel"` RegionLabel string `json:"regionLabel"` ZoneLabel string `json:"zoneLabel"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.