Documentation ¶
Index ¶
- Constants
- type ControlPlaneMachine
- type Machine
- type Provisioner
- func (self *Provisioner) AppendControlPlaneMachine(name string, csp app.CSP, region string, zone string, credential string)
- func (self *Provisioner) AppendWorkerNodeMachine(name string, csp app.CSP, region string, zone string, credential string)
- func (self *Provisioner) AssignNodeLabelAnnotation() error
- func (self *Provisioner) BindVM(vms []tumblebug.VM) ([]*model.Node, error)
- func (self *Provisioner) Bootstrap() error
- func (self *Provisioner) BuildAllMachines() error
- func (self *Provisioner) CleanupAllResources() error
- func (self *Provisioner) DrainAndDeleteNode(nodeName string) error
- func (self *Provisioner) GetMachinesAll() []*Machine
- func (self *Provisioner) InitControlPlane(kubernetesConfigReq app.ClusterConfigKubernetesReq) ([]string, string, error)
- func (self *Provisioner) InitExternalEtcd() error
- func (self *Provisioner) InstallCcm(cloudConfig string) error
- func (self *Provisioner) InstallHAProxy() error
- func (self *Provisioner) InstallNetworkCni() error
- func (self *Provisioner) InstallStorageClassNFS(storageReq app.ClusterStorageClassNfsReq) error
- func (self *Provisioner) Kubectl(format string, a ...interface{}) (string, error)
- func (self *Provisioner) NewWorkerJoinCommand() (string, error)
- type WorkerNodeMachine
Constants ¶
View Source
const ( REMOTE_TARGET_PATH = "/tmp" CNI_CANAL_FILE = "addons/cni/canal/canal_v3.20.0.yaml" CNI_KILO_CRDS_FILE = "addons/cni/kilo/crds_v0.3.0.yaml" CNI_KILO_KUBEADM_FILE = "addons/cni/kilo/kilo-kubeadm-flannel_v0.3.0.yaml" CNI_KILO_FLANNEL_FILE = "addons/cni/kilo/kube-flannel_v0.14.0.yaml" CNI_FLANNEL_FILE = "addons/cni/flannel/kube-flannel_v0.19.0.yml" CNI_CALICO_FILE = "addons/cni/calico/calico-v0.3.1.yaml" SC_NFS_RBAC_FILE = "addons/nfs/rbac_v4.0.16.yaml" SC_NFS_CLASS_FILE = "addons/nfs/class_v4.0.16.yaml" CCM_CLOUD_CONFIG_FILE = "cloud-config" CCM_AWS_ROLE_SA_FILE = "addons/ccm/aws/clusterrole-service-account.yaml" CCM_AWS_DS_FILE = "addons/ccm/aws/aws-cloud-controller-manager-daemonset.yaml" CCM_OPENSTACK_ROLE_BINDINGS_FILE = "addons/ccm/openstack/cloud-controller-manager-role-bindings.yaml" CCM_OPENSTACK_ROLES_FILE = "addons/ccm/openstack/cloud-controller-manager-roles.yaml" CCM_OPENSTACK_DS_FILE = "addons/ccm/openstack/openstack-cloud-controller-manager-ds.yaml" CCM_NCPVPC_ROLE_SA_FILE = "addons/ccm/ncpvpc/clusterrole-service-account.yaml" CCM_NCPVPC_DS_FILE = "addons/ccm/ncpvpc/ncp-cloud-controller-manager-daemonset.yaml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlPlaneMachine ¶
type ControlPlaneMachine struct {
*Machine
}
func (*ControlPlaneMachine) JoinControlPlane ¶
func (self *ControlPlaneMachine) JoinControlPlane(CPJoinCmd *string) error
control-plane join
type Machine ¶
type Machine struct { Name string NameInCsp string PublicIP string PrivateIP string Username string CSP app.CSP Role app.ROLE Region string Zone string Spec string Credential string }
func (*Machine) GetHostname ¶
type Provisioner ¶
type Provisioner struct { Cluster *model.Cluster ControlPlaneMachines map[string]*ControlPlaneMachine WorkerNodeMachines map[string]*WorkerNodeMachine // contains filtered or unexported fields }
func NewProvisioner ¶
func NewProvisioner(cluster *model.Cluster) *Provisioner
new a instance of provider
func (*Provisioner) AppendControlPlaneMachine ¶
func (self *Provisioner) AppendControlPlaneMachine(name string, csp app.CSP, region string, zone string, credential string)
append a control-plane-machine
func (*Provisioner) AppendWorkerNodeMachine ¶
func (self *Provisioner) AppendWorkerNodeMachine(name string, csp app.CSP, region string, zone string, credential string)
append a worker-node-machine
func (*Provisioner) AssignNodeLabelAnnotation ¶
func (self *Provisioner) AssignNodeLabelAnnotation() error
assign node labels
func (*Provisioner) BuildAllMachines ¶
func (self *Provisioner) BuildAllMachines() error
func (*Provisioner) CleanupAllResources ¶
func (self *Provisioner) CleanupAllResources() error
func (*Provisioner) DrainAndDeleteNode ¶
func (self *Provisioner) DrainAndDeleteNode(nodeName string) error
drain a node + delete node + delete a VM
func (*Provisioner) GetMachinesAll ¶
func (self *Provisioner) GetMachinesAll() []*Machine
get machines
func (*Provisioner) InitControlPlane ¶
func (self *Provisioner) InitControlPlane(kubernetesConfigReq app.ClusterConfigKubernetesReq) ([]string, string, error)
coantrol-plane init
func (*Provisioner) InitExternalEtcd ¶
func (self *Provisioner) InitExternalEtcd() error
func (*Provisioner) InstallCcm ¶
func (self *Provisioner) InstallCcm(cloudConfig string) error
install cloud-controller-manager
func (*Provisioner) InstallNetworkCni ¶
func (self *Provisioner) InstallNetworkCni() error
install network-cni
func (*Provisioner) InstallStorageClassNFS ¶
func (self *Provisioner) InstallStorageClassNFS(storageReq app.ClusterStorageClassNfsReq) error
func (*Provisioner) Kubectl ¶
func (self *Provisioner) Kubectl(format string, a ...interface{}) (string, error)
execute kubectl
func (*Provisioner) NewWorkerJoinCommand ¶
func (self *Provisioner) NewWorkerJoinCommand() (string, error)
new generate worker-node join command
type WorkerNodeMachine ¶
type WorkerNodeMachine struct {
*Machine
}
func (*WorkerNodeMachine) JoinWorker ¶
func (self *WorkerNodeMachine) JoinWorker(workerJoinCmd *string) error
woker node join
Click to show internal directories.
Click to hide internal directories.