Documentation
¶
Overview ¶
Package action are various actions used by the package
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoDistroSelected = errors.New("no distro selected: pass --distro, or set distro.type in the cargoship config file")
ErrNoDistroSelected is returned when an action is built with no distro at all, rather than with one no module claims.
Functions ¶
This section is empty.
Types ¶
type ApplyOptions ¶
type ApplyOptions struct {
// Manager is the phase manager
Manager *phase.Manager
// AllowDowngrade continues when a host already runs a version newer than the package,
// rather than refusing the run
AllowDowngrade bool
// NoWait skips waiting for the cluster to be ready
NoWait bool
// NoDrain skips draining worker nodes
NoDrain bool
// ModifyHosts updates the /etc/hosts file with all the nodes in the cluster
ModifyHosts bool
// ModifyFirewall updates the firewall, firewalld, ufw, or nftables, on the nodes
ModifyFirewall bool
// WorkerConcurrent number of workers that will be installed or upgraded at a time, as a fixed
// count ("5") or a percentage of the batch ("25%")
WorkerConcurrent string
// UpdateKubeConfig whether to update the config
UpdateKubeConfig bool
// KubeConfigPath is the kubeconfig file to merge the admin creds into, the standard
// location when empty
KubeConfigPath string
// LabelNodes whether to check and add the node-role.kubernetes.io/<profile> label on nodes
LabelNodes bool
// AllowUnmanagedNodes lets an apply continue when the cluster holds a node no host in the
// config accounts for, rather than stopping on it
AllowUnmanagedNodes bool
// Keyring decrypts encrypted registry credentials, in either supported format
Keyring *clustercfg.Keyring
}
ApplyOptions struct
type EngineConfigSync ¶
type EngineConfigSync struct {
EngineConfigSyncOptions
Phases phase.Phases
}
EngineConfigSync state logic
func NewEngineConfigSync ¶
func NewEngineConfigSync(opts EngineConfigSyncOptions) (*EngineConfigSync, error)
NewEngineConfigSync an engine-config-sync action object
type EngineConfigSyncOptions ¶
type EngineConfigSyncOptions struct {
// Manager is the phase manager
Manager *phase.Manager
// WorkerConcurrent number of workers that will be synced at a time, as a fixed
// count ("5") or a percentage of the batch ("25%")
WorkerConcurrent string
// Keyring decrypts encrypted registry credentials, in either supported format
Keyring *clustercfg.Keyring
// LabelNodes whether to check and add the node-role.kubernetes.io/<profile> label on nodes
LabelNodes bool
// UpdateKubeConfig whether to update a kubeconfig file with the admin creds for the cluster
UpdateKubeConfig bool
// KubeConfigPath is the kubeconfig file to merge the admin creds into, the standard
// location when empty
KubeConfigPath string
// AllowDowngrade continues when a host already runs a version newer than the package,
// rather than refusing the run
AllowDowngrade bool
}
EngineConfigSyncOptions struct
type KubeConfig ¶
type KubeConfig struct {
KubeConfigOptions
Phases phase.Phases
}
KubeConfig state logic
func NewKubeConfig ¶
func NewKubeConfig(opts KubeConfigOptions) (*KubeConfig, error)
NewKubeConfig pulls the admin cert from a control-plane node and updates the local kube-config
type KubeConfigOptions ¶
type KubeConfigOptions struct {
// Manager is the phase manager
Manager *phase.Manager
// KubeConfigPath is the kubeconfig file to merge the admin creds into, the standard
// location when empty
KubeConfigPath string
}
KubeConfigOptions struct
type PrepareOptions ¶
type PrepareOptions struct {
// Manager is the phase manager
Manager *phase.Manager
// NoWait skips waiting for the cluster to be ready
NoWait bool
// NoDrain skips draining worker nodes
NoDrain bool
// ModifyHosts updates the /etc/hosts file with all the nodes in the cluster
ModifyHosts bool
// ModifyFirewall updates the firewall, firewalld, ufw, or nftables, on the nodes
ModifyFirewall bool
// ModifyModules whether to update the host kernel modules
ModifyModules bool
}
PrepareOptions struct
type ResetOptions ¶
type ResetOptions struct {
// Manager is the phase manager
Manager *phase.Manager
// NoWait skips waiting for the cluster to be ready
NoWait bool
// NoDrain skips draining worker nodes
NoDrain bool
// DistroID is the type of Kubernetes engine that will be removed
DistroID string
// WorkerConcurrent number of workers that will be installed or upgraded at a time, as a fixed
// count ("5") or a percentage of the batch ("25%")
WorkerConcurrent string
// TargetHosts names the hosts to delete and uninstall, by hostname or by the address the
// configuration connects through. Empty means every host in the configuration, which is what
// a reset has always done.
//
// The hosts not named still take part: leader selection scans the whole configuration, so a
// controller that is staying is what the node deletions are driven through. That separation is
// the whole point -- see #339.
TargetHosts []string
}
ResetOptions struct
Click to show internal directories.
Click to hide internal directories.