upgrade

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventReason                     = "Upgrading"
	ErrorOnFailedUpgradeEventReason = "ErrUpgrade"
)

Variables

This section is empty.

Functions

func NewPremisesChecker

func NewPremisesChecker(
	depValidator DependencyValidator,
	healthChecker doguHealthChecker,
	recursiveHealthChecker doguRecursiveHealthChecker,
) *premisesChecker

NewPremisesChecker creates a new upgrade premises checker.

func NewUpgradeExecutor

func NewUpgradeExecutor(
	client client.Client,
	mgrSet *util.ManagerSet,
	eventRecorder record.EventRecorder,
	ecosystemClient ecoSystem.EcoSystemV2Interface,
) *upgradeExecutor

NewUpgradeExecutor creates a new upgrade executor.

Types

type DependencyValidator

type DependencyValidator interface {
	// ValidateDependencies is used to check if dogu dependencies are installed.
	ValidateDependencies(ctx context.Context, dogu *cesappcore.Dogu) error
}

DependencyValidator checks if all necessary dependencies for an upgrade are installed.

type PremisesChecker

type PremisesChecker interface {
	// Check checks if dogu premises are met before a dogu upgrade.
	Check(ctx context.Context, toDoguResource *k8sv2.Dogu, fromDogu *cesappcore.Dogu, toDogu *cesappcore.Dogu) error
}

PremisesChecker includes functionality to check if the premises for an upgrade are met.

type UpgradeExecutor

type UpgradeExecutor interface {
	// Upgrade executes the actual dogu upgrade.
	Upgrade(ctx context.Context, toDoguResource *k8sv2.Dogu, fromDogu *cesappcore.Dogu, toDogu *cesappcore.Dogu) error
}

UpgradeExecutor applies upgrades the upgrade from an earlier dogu version to a newer version.

Jump to

Keyboard shortcuts

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