Documentation ¶
Index ¶
- Constants
- func ExistNode(mgr *Manager, node *kubekeyapiv1alpha1.HostCfg) bool
- type ClusterStatus
- type Manager
- func (mgr *Manager) Copy() *Manager
- func (mgr *Manager) RunTaskOnAllNodes(task NodeTask, parallel bool) error
- func (mgr *Manager) RunTaskOnEtcdNodes(task NodeTask, parallel bool) error
- func (mgr *Manager) RunTaskOnK8sNodes(task NodeTask, parallel bool) error
- func (mgr *Manager) RunTaskOnMasterNodes(task NodeTask, parallel bool) error
- func (mgr *Manager) RunTaskOnNodes(nodes []kubekeyapiv1alpha1.HostCfg, task NodeTask, parallel bool) error
- func (mgr *Manager) RunTaskOnWorkerNodes(task NodeTask, parallel bool) error
- type NodeTask
- type Task
- type UpgradeStatus
Constants ¶
View Source
const ( IsInitCluster = true Docker = "docker" Conatinerd = "containerd" Crio = "crio" Isula = "isula" )
View Source
const ( // DefaultCon defineds the number of concurrent. DefaultCon = 10 // Timeout defineds how long the task will take to timeout. Timeout = 120 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterStatus ¶ added in v1.2.0
type ClusterStatus struct { IsExist bool Version string AllNodesInfo map[string]string Kubeconfig string BootstrapToken string CertificateKey string }
ClusterStatus is used to store cluster status
type Manager ¶
type Manager struct { ObjName string Cluster *kubekeyapiv1alpha1.ClusterSpec Logger log.FieldLogger Connector connector.Connector Runner *runner.Runner AllNodes []kubekeyapiv1alpha1.HostCfg EtcdNodes []kubekeyapiv1alpha1.HostCfg MasterNodes []kubekeyapiv1alpha1.HostCfg WorkerNodes []kubekeyapiv1alpha1.HostCfg K8sNodes []kubekeyapiv1alpha1.HostCfg EtcdContainer bool ClusterHosts []string WorkDir string KsEnable bool KsVersion string Debug bool SkipCheck bool SkipPullImages bool SourcesDir string AddImagesRepo bool InCluster bool ContainerManager string ContainerRuntimeEndpoint string DeployLocalStorage bool Kubeconfig string ClusterStatus *ClusterStatus UpgradeStatus *UpgradeStatus Conditions []kubekeyapiv1alpha1.Condition ClientSet *kubekeyclientset.Clientset DownloadCommand func(path, url string) string }
Manager defines all the parameters needed for the installation.
func (*Manager) RunTaskOnAllNodes ¶
RunTaskOnAllNodes is used to execute tasks on all nodes.
func (*Manager) RunTaskOnEtcdNodes ¶
RunTaskOnEtcdNodes is used to execute tasks on all etcd nodes.
func (*Manager) RunTaskOnK8sNodes ¶
RunTaskOnK8sNodes is used to execute tasks on all nodes in k8s cluster.
func (*Manager) RunTaskOnMasterNodes ¶
RunTaskOnMasterNodes is used to execute tasks on all master nodes.
func (*Manager) RunTaskOnNodes ¶
func (mgr *Manager) RunTaskOnNodes(nodes []kubekeyapiv1alpha1.HostCfg, task NodeTask, parallel bool) error
RunTaskOnNodes is used to execute tasks on nodes.
type NodeTask ¶
type NodeTask func(mgr *Manager, node *kubekeyapiv1alpha1.HostCfg) error
NodeTask defineds the tasks to be performed on the node.
Click to show internal directories.
Click to hide internal directories.