Documentation
¶
Index ¶
- Constants
- type Cluster
- type ComponentStatus
- type Host
- type NodeTask
- type RunModeEnum
- type State
- func (s *State) Clone() *State
- func (s *State) KubeadmVerboseFlag() string
- func (s *State) RunTaskOnAllNodes(task NodeTask, parallel RunModeEnum) error
- func (s *State) RunTaskOnControlPlane(task NodeTask, parallel RunModeEnum) error
- func (s *State) RunTaskOnFollowers(task NodeTask, parallel RunModeEnum) error
- func (s *State) RunTaskOnLeader(task NodeTask) error
- func (s *State) RunTaskOnNodes(nodes []kubeoneapi.HostConfig, task NodeTask, parallel RunModeEnum) error
- func (s *State) RunTaskOnStaticWorkers(task NodeTask, parallel RunModeEnum) error
Constants ¶
View Source
const ( SystemDStatusUnknown = 1 << iota // systemd unit unknown SystemdDStatusDead // systemd unit dead SystemDStatusRestarting // systemd unit restarting ComponentInstalled // installed (package, or direct download) SystemDStatusActive // systemd unit is activated SystemDStatusRunning // systemd unit is running )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentStatus ¶
func (*ComponentStatus) Healthy ¶
func (cs *ComponentStatus) Healthy() bool
type Host ¶
type Host struct {
ContainerRuntime ComponentStatus
Hostname string
IsInCluster bool
Kubeconfig []byte
Kubernetes ComponentStatus
OS kubeone.OperatingSystemName
PrivateAddress string
PublicAddress string
}
type NodeTask ¶
type NodeTask func(ctx *State, node *kubeoneapi.HostConfig, conn ssh.Connection) error
NodeTask is a task that is specifically tailored to run on a single node.
type RunModeEnum ¶
type RunModeEnum bool
const ( RunSequentially RunModeEnum = false RunParallel RunModeEnum = true )
type State ¶
type State struct {
Cluster *kubeoneapi.KubeOneCluster
LiveCluster *Cluster
Logger logrus.FieldLogger
Connector *ssh.Connector
Configuration *configupload.Configuration
Runner *runner.Runner
Context context.Context
WorkDir string
JoinCommand string
JoinToken string
RESTConfig *rest.Config
DynamicClient dynclient.Client
Verbose bool
BackupFile string
DestroyWorkers bool
RemoveBinaries bool
ForceUpgrade bool
ForceInstall bool
UpgradeMachineDeployments bool
PatchCNI bool
CredentialsFilePath string
ManifestFilePath string
}
State holds together currently test flags and parsed info, along with utilities like logger
func (*State) KubeadmVerboseFlag ¶
func (*State) RunTaskOnAllNodes ¶
func (s *State) RunTaskOnAllNodes(task NodeTask, parallel RunModeEnum) error
RunTaskOnAllNodes runs the given task on all hosts.
func (*State) RunTaskOnControlPlane ¶
func (s *State) RunTaskOnControlPlane(task NodeTask, parallel RunModeEnum) error
func (*State) RunTaskOnFollowers ¶
func (s *State) RunTaskOnFollowers(task NodeTask, parallel RunModeEnum) error
RunTaskOnFollowers runs the given task on the follower hosts.
func (*State) RunTaskOnLeader ¶
RunTaskOnLeader runs the given task on the leader host.
func (*State) RunTaskOnNodes ¶
func (s *State) RunTaskOnNodes(nodes []kubeoneapi.HostConfig, task NodeTask, parallel RunModeEnum) error
RunTaskOnNodes runs the given task on the given selection of hosts.
func (*State) RunTaskOnStaticWorkers ¶
func (s *State) RunTaskOnStaticWorkers(task NodeTask, parallel RunModeEnum) error
Click to show internal directories.
Click to hide internal directories.