Documentation ¶
Index ¶
- Constants
- func GetClientFromConfig(adminConfPath string) (runtimeClient.Client, error)
- func NewK0sRuntime(infra infradriver.InfraDriver, containerRuntimeInfo containerruntime.Info, ...) (runtime.Installer, error)
- func NewKubeDriver(kubeConfig string) (runtime.Driver, error)
- type Runtime
- func (k *Runtime) CopyJoinToken(role string, hosts []net.IP) error
- func (k *Runtime) GetCurrentRuntimeDriver() (runtime.Driver, error)
- func (k *Runtime) Install() error
- func (k *Runtime) JoinCommand(role, registryInfo string) []string
- func (k *Runtime) Reset() error
- func (k *Runtime) ScaleDown(mastersToDelete, workersToDelete []net.IP) error
- func (k *Runtime) ScaleUp(newMasters, newWorkers []net.IP) error
- func (k *Runtime) Upgrade() error
- func (k *Runtime) WaitK0sReady(host net.IP) error
- func (k *Runtime) WaitSSHReady(tryTimes int, hosts ...net.IP) error
Constants ¶
View Source
const ( DefaultAdminConfPath = "/var/lib/k0s/pki/admin.conf" DefaultK0sConfigPath = "/etc/k0s/k0s.yaml" DefaultK0sWorkerJoin = "/etc/k0s/worker" DefaultK0sControllerJoin = "/etc/k0s/controller" WorkerRole = "worker" ControllerRole = "controller" ExternalCRIAddress = "remote:/run/containerd/containerd.sock" )
View Source
const TimeForWaitingK0sStart = 10
View Source
const WaitingFork0sServiceStartTimes = 5
Variables ¶
This section is empty.
Functions ¶
func GetClientFromConfig ¶ added in v0.9.2
func GetClientFromConfig(adminConfPath string) (runtimeClient.Client, error)
func NewK0sRuntime ¶
func NewK0sRuntime(infra infradriver.InfraDriver, containerRuntimeInfo containerruntime.Info, registryInfo registry.Info) (runtime.Installer, error)
NewK0sRuntime gen a k0s bootstrap process that leading k0s cluster management
Types ¶
type Runtime ¶
type Runtime struct { Vlog int // contains filtered or unexported fields }
Runtime struct is the runtime interface for k0s
func (*Runtime) GetCurrentRuntimeDriver ¶ added in v0.9.2
func (*Runtime) JoinCommand ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.