phase

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoWait bool

NoWait is used by various phases to decide if node ready state should be waited for or not

Functions

This section is empty.

Types

type ConfigureK0s

type ConfigureK0s struct {
	GenericPhase
}

ConfigureK0s writes the k0s configuration to host k0s config dir

func (*ConfigureK0s) Run

func (p *ConfigureK0s) Run() error

Run the phase

func (*ConfigureK0s) Title

func (p *ConfigureK0s) Title() string

Title returns the phase title

type Connect

type Connect struct {
	GenericPhase
}

Connect connects to each of the hosts

func (*Connect) Run

func (p *Connect) Run() error

Run the phase

func (*Connect) Title

func (p *Connect) Title() string

Title for the phase

type DetectOS

type DetectOS struct {
	GenericPhase
}

DetectOS performs remote OS detection

func (*DetectOS) Run

func (p *DetectOS) Run() error

Run the phase

func (*DetectOS) Title

func (p *DetectOS) Title() string

Title for the phase

type Disconnect

type Disconnect struct {
	GenericPhase
}

Disconnect disconnects from the hosts

func (*Disconnect) Run

func (p *Disconnect) Run() error

Run the phase

func (*Disconnect) Title

func (p *Disconnect) Title() string

Title for the phase

type DownloadBinaries

type DownloadBinaries struct {
	GenericPhase
	// contains filtered or unexported fields
}

DownloadBinaries downloads k0s binaries to localohost temp files

func (*DownloadBinaries) Prepare

func (p *DownloadBinaries) Prepare(config *config.Cluster) error

Prepare the phase

func (*DownloadBinaries) Run

func (p *DownloadBinaries) Run() error

Run the phase

func (*DownloadBinaries) ShouldRun

func (p *DownloadBinaries) ShouldRun() bool

ShouldRun is true when the phase should be run

func (*DownloadBinaries) Title

func (p *DownloadBinaries) Title() string

Title for the phase

type DownloadK0s

type DownloadK0s struct {
	GenericPhase
	// contains filtered or unexported fields
}

DownloadK0s performs k0s online download on the hosts

func (*DownloadK0s) Prepare

func (p *DownloadK0s) Prepare(config *config.Cluster) error

Prepare the phase

func (*DownloadK0s) Run

func (p *DownloadK0s) Run() error

Run the phase

func (*DownloadK0s) ShouldRun

func (p *DownloadK0s) ShouldRun() bool

ShouldRun is true when the phase should be run

func (*DownloadK0s) Title

func (p *DownloadK0s) Title() string

Title for the phase

type GatherFacts

type GatherFacts struct {
	GenericPhase
}

GatherFacts gathers information about hosts, such as if k0s is already up and running

func (*GatherFacts) Run

func (p *GatherFacts) Run() error

Run the phase

func (*GatherFacts) Title

func (p *GatherFacts) Title() string

Title for the phase

type GatherK0sFacts

type GatherK0sFacts struct {
	GenericPhase
	// contains filtered or unexported fields
}

GatherK0sFacts gathers information about hosts, such as if k0s is already up and running

func (*GatherK0sFacts) Run

func (p *GatherK0sFacts) Run() error

Run the phase

func (*GatherK0sFacts) Title

func (p *GatherK0sFacts) Title() string

Title for the phase

type GenericPhase

type GenericPhase struct {
	analytics.Phase
	Config *config.Cluster
}

GenericPhase is a basic phase which gets a config via prepare, sets it into p.Config

func (*GenericPhase) GetConfig

func (p *GenericPhase) GetConfig() *config.Cluster

GetConfig is an accessor to phase Config

func (*GenericPhase) Prepare

func (p *GenericPhase) Prepare(c *config.Cluster) error

Prepare the phase

type GetKubeconfig

type GetKubeconfig struct {
	GenericPhase
}

GetKubeconfig is a phase to get and dump the admin kubeconfig

func (*GetKubeconfig) Run

func (p *GetKubeconfig) Run() error

Run the phase

func (*GetKubeconfig) Title

func (p *GetKubeconfig) Title() string

Title for the phase

type InitializeK0s

type InitializeK0s struct {
	GenericPhase
	// contains filtered or unexported fields
}

InitializeK0s sets up the "initial" k0s controller

func (*InitializeK0s) Prepare

func (p *InitializeK0s) Prepare(config *config.Cluster) error

Prepare the phase

func (*InitializeK0s) Run

func (p *InitializeK0s) Run() error

Run the phase

func (*InitializeK0s) ShouldRun

func (p *InitializeK0s) ShouldRun() bool

ShouldRun is true when there is a leader host

func (*InitializeK0s) Title

func (p *InitializeK0s) Title() string

Title for the phase

type InstallControllers

type InstallControllers struct {
	GenericPhase
	// contains filtered or unexported fields
}

InstallControllers installs k0s controllers and joins them to the cluster

func (*InstallControllers) Prepare

func (p *InstallControllers) Prepare(config *config.Cluster) error

Prepare the phase

func (*InstallControllers) Run

func (p *InstallControllers) Run() error

Run the phase

func (*InstallControllers) ShouldRun

func (p *InstallControllers) ShouldRun() bool

ShouldRun is true when there are controllers

func (*InstallControllers) Title

func (p *InstallControllers) Title() string

Title for the phase

type InstallWorkers

type InstallWorkers struct {
	GenericPhase
	// contains filtered or unexported fields
}

InstallWorkers installs k0s on worker hosts and joins them to the cluster

func (*InstallWorkers) Prepare

func (p *InstallWorkers) Prepare(config *config.Cluster) error

Prepare the phase

func (*InstallWorkers) Run

func (p *InstallWorkers) Run() error

Run the phase

func (*InstallWorkers) ShouldRun

func (p *InstallWorkers) ShouldRun() bool

ShouldRun is true when there are workers

func (*InstallWorkers) Title

func (p *InstallWorkers) Title() string

Title for the phase

type Manager

type Manager struct {
	Config *config.Cluster
	// contains filtered or unexported fields
}

Manager executes phases to construct the cluster

func (*Manager) AddPhase

func (m *Manager) AddPhase(p ...phase)

AddPhase adds a Phase to Manager

func (*Manager) Run

func (m *Manager) Run() error

Run executes all the added Phases in order

type PrepareHosts

type PrepareHosts struct {
	GenericPhase
}

PrepareHosts installs required packages and so on on the hosts.

func (*PrepareHosts) Run

func (p *PrepareHosts) Run() error

Run the phase

func (*PrepareHosts) Title

func (p *PrepareHosts) Title() string

Title for the phase

type Reset added in v0.5.0

type Reset struct {
	GenericPhase
	// contains filtered or unexported fields
}

Reset uninstalls k0s from the hosts

func (*Reset) Prepare added in v0.5.0

func (p *Reset) Prepare(config *config.Cluster) error

Prepare the phase

func (*Reset) Run added in v0.5.0

func (p *Reset) Run() error

Run the phase

func (*Reset) Title added in v0.5.0

func (p *Reset) Title() string

Title for the phase

type UpgradeControllers added in v0.5.0

type UpgradeControllers struct {
	GenericPhase
	// contains filtered or unexported fields
}

UpgradeControllers upgrades the controllers one-by-one

func (*UpgradeControllers) Prepare added in v0.5.0

func (p *UpgradeControllers) Prepare(config *config.Cluster) error

Prepare the phase

func (*UpgradeControllers) Run added in v0.5.0

func (p *UpgradeControllers) Run() error

Run the phase

func (*UpgradeControllers) ShouldRun added in v0.5.0

func (p *UpgradeControllers) ShouldRun() bool

ShouldRun is true when there are controllers that needs to be upgraded

func (*UpgradeControllers) Title added in v0.5.0

func (p *UpgradeControllers) Title() string

Title for the phase

type UpgradeWorkers added in v0.5.0

type UpgradeWorkers struct {
	GenericPhase

	NoDrain bool
	// contains filtered or unexported fields
}

UpgradeWorkers upgrades workers in batches

func (*UpgradeWorkers) Prepare added in v0.5.0

func (p *UpgradeWorkers) Prepare(config *config.Cluster) error

Prepare the phase

func (*UpgradeWorkers) Run added in v0.5.0

func (p *UpgradeWorkers) Run() error

Run the phase

func (*UpgradeWorkers) ShouldRun added in v0.5.0

func (p *UpgradeWorkers) ShouldRun() bool

ShouldRun is true when there are workers that needs to be upgraded

func (*UpgradeWorkers) Title added in v0.5.0

func (p *UpgradeWorkers) Title() string

Title for the phase

type UploadBinaries

type UploadBinaries struct {
	GenericPhase
	// contains filtered or unexported fields
}

UploadBinaries uploads k0s binaries from localhost to target

func (*UploadBinaries) Prepare

func (p *UploadBinaries) Prepare(config *config.Cluster) error

Prepare the phase

func (*UploadBinaries) Run

func (p *UploadBinaries) Run() error

Run the phase

func (*UploadBinaries) ShouldRun

func (p *UploadBinaries) ShouldRun() bool

ShouldRun is true when there are hosts that need binary uploading

func (*UploadBinaries) Title

func (p *UploadBinaries) Title() string

Title for the phase

type UploadFiles added in v0.6.0

type UploadFiles struct {
	GenericPhase
	// contains filtered or unexported fields
}

UploadFiles implements a phase which upload files to hosts

func (*UploadFiles) Prepare added in v0.6.0

func (p *UploadFiles) Prepare(config *config.Cluster) error

Prepare the phase

func (*UploadFiles) Run added in v0.6.0

func (p *UploadFiles) Run() error

Run the phase

func (*UploadFiles) ShouldRun added in v0.6.0

func (p *UploadFiles) ShouldRun() bool

ShouldRun is true when there are workers

func (*UploadFiles) Title added in v0.6.0

func (p *UploadFiles) Title() string

Title for the phase

type ValidateFacts added in v0.5.0

type ValidateFacts struct {
	GenericPhase
}

ValidateFacts performs remote OS detection

func (*ValidateFacts) Run added in v0.5.0

func (p *ValidateFacts) Run() error

Run the phase

func (*ValidateFacts) Title added in v0.5.0

func (p *ValidateFacts) Title() string

Title for the phase

type ValidateHosts

type ValidateHosts struct {
	GenericPhase
	// contains filtered or unexported fields
}

ValidateHosts performs remote OS detection

func (*ValidateHosts) Run

func (p *ValidateHosts) Run() error

Run the phase

func (*ValidateHosts) Title

func (p *ValidateHosts) Title() string

Title for the phase

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL