action

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package action are various actions used by the package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apply

type Apply struct {
	ApplyOptions
	Phases phase.Phases
}

Apply state logic

func NewApply

func NewApply(opts ApplyOptions) *Apply

NewApply an apply action object

func (Apply) Run

func (a Apply) Run(ctx context.Context) error

Run the actions

type ApplyOptions

type ApplyOptions struct {
	// Manager is the phase manager
	Manager *phase.Manager
	// DisableDowngradeCheck skips the downgrade check
	DisableDowngradeCheck 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 local config
	UpdateKubeConfig bool
	// LabelNodes whether to check and add the node-role.kubernetes.io/<profile> label on nodes
	LabelNodes bool
	// VaultPassword decrypts Ansible Vault-encrypted registry credentials
	VaultPassword string
}

ApplyOptions struct

type EngineConfigSync added in v0.15.0

type EngineConfigSync struct {
	EngineConfigSyncOptions
	Phases phase.Phases
}

EngineConfigSync state logic

func NewEngineConfigSync added in v0.15.0

func NewEngineConfigSync(opts EngineConfigSyncOptions) *EngineConfigSync

NewEngineConfigSync an engine-config-sync action object

func (EngineConfigSync) Run added in v0.15.0

Run the actions

type EngineConfigSyncOptions added in v0.15.0

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
	// VaultPassword decrypts Ansible Vault-encrypted registry credentials
	VaultPassword string
	// LabelNodes whether to check and add the node-role.kubernetes.io/<profile> label on nodes
	LabelNodes bool
	// UpdateKubeConfig whether to update the local kubeconfig file with the admin creds for the cluster
	UpdateKubeConfig bool
}

EngineConfigSyncOptions struct

type KubeConfig added in v0.3.0

type KubeConfig struct {
	KubeConfigOptions
	Phases phase.Phases
}

KubeConfig state logic

func NewKubeConfig added in v0.3.0

func NewKubeConfig(opts KubeConfigOptions) *KubeConfig

NewKubeConfig pulls the admin cert from a control-plane node and updates the local kube-config

func (KubeConfig) Run added in v0.3.0

func (a KubeConfig) Run(ctx context.Context) error

Run the actions

type KubeConfigOptions added in v0.3.0

type KubeConfigOptions struct {
	// Manager is the phase manager
	Manager *phase.Manager
}

KubeConfigOptions struct

type Prepare added in v0.5.0

type Prepare struct {
	PrepareOptions
	Phases phase.Phases
}

Prepare state logic

func NewPrepare added in v0.5.0

func NewPrepare(opts PrepareOptions) *Prepare

NewPrepare an prepare action object

func (Prepare) Run added in v0.5.0

func (a Prepare) Run(ctx context.Context) error

Run the actions

type PrepareOptions added in v0.5.0

type PrepareOptions struct {
	// Manager is the phase manager
	Manager *phase.Manager
	// DisableDowngradeCheck skips the downgrade check
	DisableDowngradeCheck 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
	// ModifyModules whether to update the host kernel modules
	ModifyModules bool
}

PrepareOptions struct

type Reset

type Reset struct {
	ResetOptions
	Phases phase.Phases
}

Reset state logic

func NewReset

func NewReset(opts ResetOptions) *Reset

NewReset an apply action object

func (Reset) Run

func (r Reset) Run(ctx context.Context) error

Run the actions

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
}

ResetOptions struct

Jump to

Keyboard shortcuts

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