Documentation ¶
Index ¶
- Constants
- func ClearCurrentWizardData()
- func GetLog(logId uint64) []byte
- func GetLogReader(logId uint64) io.ReadCloser
- func InitLogs()
- func SetLogByReader(reader io.Reader) (logId uint64, err error)
- func SetLogByString(content string) (logId uint64, err error)
- type Annotation
- type AuthenticationType
- type CheckItem
- type CheckReport
- type Cluster
- func (cluster *Cluster) AddNode(node *Node) error
- func (cluster *Cluster) AddNodeList(nodes []*Node) error
- func (cluster *Cluster) ClearClusterCheckingData()
- func (cluster *Cluster) ClearClusterDeployData()
- func (cluster *Cluster) DeleteNode(ip string) error
- func (cluster *Cluster) GetCheckResult() constant.CheckResult
- func (cluster *Cluster) GetDeployClusterStatus() DeployClusterStatus
- func (cluster *Cluster) GetNode(ip string) *Node
- func (cluster *Cluster) GetNodeByName(name string) *Node
- func (cluster *Cluster) MarkNodeChecking() error
- func (cluster *Cluster) MarkNodeDeploying() error
- func (cluster *Cluster) SetClusterCheckResult(result constant.CheckResult, failureDetail *common.FailureDetail)
- func (cluster *Cluster) SetClusterDeploymentStatus(status DeployClusterStatus, failureDetail *common.FailureDetail)
- func (cluster *Cluster) UpdateNode(node *Node) error
- type ClusterInfo
- type ConnectionData
- type DeployClusterStatus
- type DeployStatus
- type DeploymentReport
- type KubeAPIServerConnectType
- type KubeAPIServerConnectionData
- type Label
- type Node
- func (node *Node) IsMatchMachineRole(role constant.MachineRole) bool
- func (node *Node) SetCheckItem(itemName string, result constant.CheckResult, detail *common.FailureDetail)
- func (node *Node) SetCheckResult(result constant.CheckResult, detail *common.FailureDetail)
- func (node *Node) SetDeployResult(role constant.MachineRole, status DeployStatus, detail *common.FailureDetail)
- type Progress
- type Taint
- type TaintEffect
- type WizardData
- type WizardMode
Constants ¶
View Source
const ( KubeAPIServerConnectTypeFirstMasterIP KubeAPIServerConnectType = "firstMasterIP" KubeAPIServerConnectTypeKeepalived KubeAPIServerConnectType = "keepalived" KubeAPIServerConnectTypeLoadBalancer KubeAPIServerConnectType = "loadbalancer" DeployClusterStatusPending DeployClusterStatus = "pending" DeployClusterStatusRunning DeployClusterStatus = "running" DeployClusterStatusSuccessful DeployClusterStatus = "successful" DeployClusterStatusFailed DeployClusterStatus = "failed" DeployClusterStatusWorkedButHaveError DeployClusterStatus = "workedButHaveError" DeployClusterStatusDeployServiceUnknown DeployClusterStatus = "unknown(deploy)" DefaultNodePortMinimum uint16 = 30000 DefaultNodePortMaximum uint16 = 32767 )
View Source
const ( AuthenticationTypePassword AuthenticationType = "password" // Use Password to authorize AuthenticationTypePrivateKey AuthenticationType = "privateKey" // Use RSA PrivateKey to authorize TaintEffectNoSchedule TaintEffect = "NoSchedule" TaintEffectNoExecute TaintEffect = "NoExecute" TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule" DeployStatusPending DeployStatus = "pending" DeployStatusRunning DeployStatus = "running" DeployStatusSuccessful DeployStatus = "successful" DeployStatusFailed DeployStatus = "failed" DeployStatusAborted DeployStatus = "aborted" DefaultDockerRootDirectory = "/var/lib/docker" DefaultUsername = "root" )
View Source
const ( ProgressSettingClusterInformation Progress = "settingClusterInformation" ProgressSettingNodesInformation Progress = "settingNodesInformation" ProgressCheckingNodes Progress = "checkingNodes" ProgressDeploying Progress = "deploying" ProgressDeployCompleted Progress = "deployCompleted" WizardModeNormal WizardMode = "normal" WizardModeAdvanced WizardMode = "advanced" )
View Source
const (
ServiceNodeID = 0
)
Variables ¶
This section is empty.
Functions ¶
func ClearCurrentWizardData ¶
func ClearCurrentWizardData()
func GetLogReader ¶
func GetLogReader(logId uint64) io.ReadCloser
func SetLogByString ¶
Types ¶
type Annotation ¶
type AuthenticationType ¶
type AuthenticationType string // Type of authorization, password or privateKey
type CheckItem ¶
type CheckItem struct { ItemName string // Check Item Name CheckResult constant.CheckResult Error *common.FailureDetail }
func NewCheckItem ¶
func NewCheckItem() *CheckItem
type CheckReport ¶
type CheckReport struct { CheckItems []*CheckItem // Check item list CheckResult constant.CheckResult // Overall inspection status CheckedError *common.FailureDetail // Checked failure detail }
type Cluster ¶
type Cluster struct { ClusterId uint64 Info *ClusterInfo Nodes []*Node DeployClusterStatus DeployClusterStatus DeployClusterError *common.FailureDetail ClusterCheckResult constant.CheckResult ClusterCheckError *common.FailureDetail Wizard *WizardData KubeConfig *string // contains filtered or unexported fields }
func GetCurrentWizard ¶
func GetCurrentWizard() *Cluster
func NewCluster ¶
func NewCluster() *Cluster
func (*Cluster) AddNodeList ¶
func (*Cluster) ClearClusterCheckingData ¶
func (cluster *Cluster) ClearClusterCheckingData()
func (*Cluster) ClearClusterDeployData ¶
func (cluster *Cluster) ClearClusterDeployData()
func (*Cluster) DeleteNode ¶
func (*Cluster) GetCheckResult ¶
func (cluster *Cluster) GetCheckResult() constant.CheckResult
func (*Cluster) GetDeployClusterStatus ¶
func (cluster *Cluster) GetDeployClusterStatus() DeployClusterStatus
func (*Cluster) GetNodeByName ¶
func (*Cluster) MarkNodeChecking ¶
func (*Cluster) MarkNodeDeploying ¶
func (*Cluster) SetClusterCheckResult ¶
func (cluster *Cluster) SetClusterCheckResult(result constant.CheckResult, failureDetail *common.FailureDetail)
func (*Cluster) SetClusterDeploymentStatus ¶
func (cluster *Cluster) SetClusterDeploymentStatus(status DeployClusterStatus, failureDetail *common.FailureDetail)
func (*Cluster) UpdateNode ¶
type ClusterInfo ¶
type ClusterInfo struct { ShortName string Name string KubeAPIServerConnection *KubeAPIServerConnectionData NodePortMinimum uint16 NodePortMaximum uint16 Labels []*Label Annotations []*Annotation }
func NewClusterInfo ¶
func NewClusterInfo() *ClusterInfo
type ConnectionData ¶
type DeployClusterStatus ¶
type DeployClusterStatus string
type DeployStatus ¶
type DeployStatus string // Deploy node status
type DeploymentReport ¶
type DeploymentReport struct { Role constant.MachineRole Status DeployStatus Error *common.FailureDetail }
func NewDeploymentReport ¶
func NewDeploymentReport() *DeploymentReport
type KubeAPIServerConnectType ¶
type KubeAPIServerConnectType string
type KubeAPIServerConnectionData ¶
type KubeAPIServerConnectionData struct { KubeAPIServerConnectType KubeAPIServerConnectType VIP string NetInterfaceName string LoadbalancerIP string LoadbalancerPort uint16 }
func NewKubeAPIServerConnectionData ¶
func NewKubeAPIServerConnectionData() *KubeAPIServerConnectionData
type Node ¶
type Node struct { ConnectionData Name string // node name Description string // node description MachineRoles []constant.MachineRole // machine role, like: master, worker, etcd. Master and worker roles are mutually exclusive. Labels []*Label // Node labels Taints []*Taint // Node taints CheckReport *CheckReport // Check node report DeploymentReports map[constant.MachineRole]*DeploymentReport // Deployment report for each role DockerRootDirectory string // Docker Root Directory // contains filtered or unexported fields }
func (*Node) IsMatchMachineRole ¶
func (node *Node) IsMatchMachineRole(role constant.MachineRole) bool
func (*Node) SetCheckItem ¶
func (node *Node) SetCheckItem(itemName string, result constant.CheckResult, detail *common.FailureDetail)
func (*Node) SetCheckResult ¶
func (node *Node) SetCheckResult(result constant.CheckResult, detail *common.FailureDetail)
func (*Node) SetDeployResult ¶
func (node *Node) SetDeployResult(role constant.MachineRole, status DeployStatus, detail *common.FailureDetail)
type Taint ¶
type Taint struct { Key string Value string Effect TaintEffect }
type TaintEffect ¶
type TaintEffect string // Taint Effect, NoSchedule, NoExecute or PreferNoSchedule
type WizardData ¶
type WizardData struct { Progress Progress WizardMode WizardMode }
func NewWizardData ¶
func NewWizardData() *WizardData
type WizardMode ¶
type WizardMode string
Click to show internal directories.
Click to hide internal directories.