phases

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LocalPackagesPhase removes old local packages.
	LocalPackagesPhase = "/local-packages"
	// ClusterPackagesPhase removes old cluster packages.
	ClusterPackagesPhase = "/cluster-packages"
	// DirectoriesPhase cleans up some directories.
	DirectoriesPhase = "/directories"
	// EtcdPhase updates etcd member's peer advertise URL.
	EtcdPhase = "/etcd"
	// StatePhase updates the cluster state.
	StatePhase = "/state"
	// NetworkPhase removes old network interfaces.
	NetworkPhase = "/interfaces"
	// TokensPhase removes old service account tokens.
	TokensPhase = "/tokens"
	// NodePhase removes old Kubernetes node object.
	NodePhase = "/node"
	// PodsPhase removes old Kubernetes pods.
	PodsPhase = "/pods"
	// GravityPhase waits for gravity-site API to become available.
	GravityPhase = "/gravity"
	// RestartPhase encapsulates Teleport/Planet restart subphases.
	RestartPhase = "/restart"
	// TeleportPhase restarts Teleport unit.
	TeleportPhase = "/teleport"
	// PlanetPhase restart Planet unit.
	PlanetPhase = "/planet"
)

Variables

This section is empty.

Functions

func NewChecks

func NewChecks(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewChecks returns executor that executes preflight checks on the node.

func NewClusterPackages

func NewClusterPackages(p fsm.ExecutorParams, operator ops.Operator, localPackages pack.PackageService) (fsm.PhaseExecutor, error)

NewClusterPackages returns executor that updates packages in the cluster state.

Specifically, it updates the certificate authority package stored in the cluster state with the one newly generated during the configure phase from the local state.

func NewDirectories

func NewDirectories(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewDirectories returns executor that cleans up directories on the node.

Specifically, it removes the directories where Teleport node and auth server keep their data so they regenerate their secrets upon startup.

func NewEtcd

func NewEtcd(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewEtcd returns executor that updates etcd member with new advertise URL.

func NewGravity

func NewGravity(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewGravity returns executor that waits for gravity-site to become available.

func NewNetwork

func NewNetwork(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewNetwork returns executor that cleans up network interfaces on the node.

func NewNode

func NewNode(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewNode returns executor that removes old Kubernetes node object.

func NewPackages

func NewPackages(p fsm.ExecutorParams, operator ops.Operator, packages pack.PackageService) (fsm.PhaseExecutor, error)

NewPackages returns executor that removes old packages on the node.

Specifically, it removes configuration and secret packages left from the original installation from the node local state.

func NewPods

func NewPods(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewPods returns executor that removes old Kubernetes pods.

All Kubernetes pods have to be recreated when the cluster comes up after reconfiguration to ensure that no old pods are lingering (Kubernetes may get confused after the old node is gone and keep pods in terminating state for a long time) and that they mount proper service tokens.

func NewRestart

func NewRestart(p fsm.ExecutorParams, operator ops.Operator, packages pack.PackageService) (fsm.PhaseExecutor, error)

NewRestart returns executor that restarts systemd unit for the specified package.

func NewState

func NewState(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewState returns executor that updates the cluster state.

This phase patches the cluster state with updated node/cluster information and also removes old certificate authorities to make sure they are regenerated when teleport auth server starts up.

func NewTokens

func NewTokens(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewTokens returns executor that removes old service account tokens.

During the reconfigure operation, the secrets get regenerated thus invalidating old service account tokens. Kubernetes will recreate them automatically when they are deleted during this phase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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