Documentation ¶
Index ¶
- Constants
- func CheckNodeSSH(infraDriver infradriver.InfraDriver, clientHosts []net.IP) ([]net.IP, error)
- func GetClusterConfPath(labels map[string]string) string
- func LoadPluginsFromFile(pluginPath string) ([]v1.Plugin, error)
- func LoadToRegistry(infraDriver infradriver.InfraDriver, distributor imagedistributor.Distributor) error
- func Register(name HookType, factory HookFunc)
- type HookConfig
- type HookConfigList
- type HookFunc
- type HookType
- type InstallInfo
- type Installer
- func (i *Installer) GetCurrentDriver() (registry.Driver, runtime.Driver, error)
- func (i *Installer) Install() error
- func (i *Installer) Rollback() error
- func (i *Installer) ScaleDown(mastersToDelete, workersToDelete []net.IP) (registry.Driver, runtime.Driver, error)
- func (i *Installer) ScaleUp(newMasters, newWorkers []net.IP) (registry.Driver, runtime.Driver, error)
- func (i *Installer) UnInstall() error
- func (i *Installer) Upgrade() error
- type Phase
- type RuntimeConfig
- type Scope
Constants ¶
View Source
const ( // CRILabel is key for get container runtime interface type. CRILabel = "cluster.alpha.sealer.io/container-runtime-type" // CRTLabel is key for get cluster runtime type. CRTLabel = "cluster.alpha.sealer.io/cluster-runtime-type" RegistryConfigMapName = "sealer-registry" RegistryConfigMapDataName = "registry" )
View Source
const (
ExtraOptionSkipWhenWorkspaceNotExists = "SkipWhenWorkspaceNotExists"
)
Variables ¶
This section is empty.
Functions ¶
func CheckNodeSSH ¶ added in v0.10.0
func CheckNodeSSH(infraDriver infradriver.InfraDriver, clientHosts []net.IP) ([]net.IP, error)
func GetClusterConfPath ¶ added in v0.9.2
func LoadPluginsFromFile ¶
LoadPluginsFromFile load plugin config files from $rootfs/plugins dir.
func LoadToRegistry ¶ added in v0.9.2
func LoadToRegistry(infraDriver infradriver.InfraDriver, distributor imagedistributor.Distributor) error
LoadToRegistry just load container image to local registry
Types ¶
type HookConfig ¶
type HookConfig struct { // Name defines hook names, will run hooks in alphabetical order. Name string `json:"name,omitempty"` //Type defines different hook type, currently only have "SHELL","HOSTNAME". Type HookType `json:"type,omitempty"` // Data real hooks data will be applied at install process. Data string `json:"data,omitempty"` // Phase defines when to run hooks. Phase Phase `json:"Phase,omitempty"` // Scope defines which roles of node will be applied with hook Data Scope Scope `json:"scope,omitempty"` }
HookConfig tell us how to configure hooks for cluster
type HookConfigList ¶
type HookConfigList []HookConfig
func (HookConfigList) Len ¶
func (r HookConfigList) Len() int
func (HookConfigList) Less ¶
func (r HookConfigList) Less(i, j int) bool
func (HookConfigList) Swap ¶
func (r HookConfigList) Swap(i, j int)
type HookFunc ¶
type HookFunc func(data string, onHosts []net.IP, driver infradriver.InfraDriver, extraOpts map[string]bool) error
func NewShellHook ¶
func NewShellHook() HookFunc
type InstallInfo ¶ added in v0.9.2
func GetClusterInstallInfo ¶ added in v0.9.2
func GetClusterInstallInfo(imageLabels map[string]string, criConfig v2.ContainerRuntimeConfig) InstallInfo
type Installer ¶
type Installer struct { RuntimeConfig // contains filtered or unexported fields }
func NewInstaller ¶
func NewInstaller(infraDriver infradriver.InfraDriver, runtimeConfig RuntimeConfig, installInfo InstallInfo) (*Installer, error)
func (*Installer) GetCurrentDriver ¶
type Phase ¶
type Phase string
const ( //PreInstallCluster on master0 PreInstallCluster Phase = "pre-install" //PostInstallCluster on master0 PostInstallCluster Phase = "post-install" //PreUnInstallCluster on master0 PreUnInstallCluster Phase = "pre-uninstall" //PostUnInstallCluster on master0 PostUnInstallCluster Phase = "post-uninstall" //PreScaleUpCluster on master0 PreScaleUpCluster Phase = "pre-scaleup" //PostScaleUpCluster on master0 PostScaleUpCluster Phase = "post-scaleup" //UpgradeCluster on master0 UpgradeCluster Phase = "upgrade" //RollbackCluster on master0 RollbackCluster Phase = "rollback" //PreInitHost on role PreInitHost Phase = "pre-init-host" //PostInitHost on role PostInitHost Phase = "post-init-host" //PreCleanHost on role PreCleanHost Phase = "pre-clean-host" //PostCleanHost on role PostCleanHost Phase = "post-clean-host" //UpgradeHost on role UpgradeHost Phase = "upgrade-host" )
type RuntimeConfig ¶
type RuntimeConfig struct { Distributor imagedistributor.Distributor ContainerRuntimeConfig v2.ContainerRuntimeConfig KubeadmConfig kubeadm.KubeadmConfig Plugins []v1.Plugin }
RuntimeConfig for Installer
Click to show internal directories.
Click to hide internal directories.