upgrade

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MPL-2.0 Imports: 19 Imported by: 2

Documentation

Overview

Package upgrade provides some functions related to Kubernetes upgrades.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checks

type Checks struct {
	// contains filtered or unexported fields
}

Checks is a set of checks to run before upgrading k8s components.

func NewChecks

func NewChecks(path *Path, state state.State, k8sConfig *rest.Config, controlPlaneNodes, workerNodes []string, logFunc func(string, ...any)) (*Checks, error)

NewChecks initializes and returns Checks.

func (*Checks) Run

func (checks *Checks) Run(ctx context.Context) error

Run executes the checks.

type ComponentItem

type ComponentItem struct {
	Node      string
	Component string
	Value     string
}

ComponentItem represents a component item.

type ComponentRemovedItemsError

type ComponentRemovedItemsError struct {
	AdmissionFlags []ComponentItem
	CLIFlags       []ComponentItem
	FeatureGates   []ComponentItem
	APIResources   map[string]int
}

ComponentRemovedItemsError is an error type for removed items.

func (ComponentRemovedItemsError) Error

Error returns the error message.

func (ComponentRemovedItemsError) ErrorOrNil

func (e ComponentRemovedItemsError) ErrorOrNil() error

ErrorOrNil returns the error if it exists.

func (*ComponentRemovedItemsError) PopulateRemovedAPIResources

func (e *ComponentRemovedItemsError) PopulateRemovedAPIResources(ctx context.Context, k8sConfig *rest.Config, removedAPIResources []string) error

PopulateRemovedAPIResources populates the removed API resources.

func (*ComponentRemovedItemsError) PopulateRemovedAdmissionPlugins

func (e *ComponentRemovedItemsError) PopulateRemovedAdmissionPlugins(node, component string, cliFlags []string, removedAdmissionPlugins []string)

PopulateRemovedAdmissionPlugins populates the removed admission plugins.

func (*ComponentRemovedItemsError) PopulateRemovedCLIFlags

func (e *ComponentRemovedItemsError) PopulateRemovedCLIFlags(node, component string, cliFlags []string, removedFlags []string)

PopulateRemovedCLIFlags populates the removed flags.

func (*ComponentRemovedItemsError) PopulateRemovedFeatureGates

func (e *ComponentRemovedItemsError) PopulateRemovedFeatureGates(node, component string, cliFlags []string, removedFeatureGates []string)

PopulateRemovedFeatureGates populates the removed feature gates.

type Path

type Path struct {
	// contains filtered or unexported fields
}

Path encodes the upgrade path.

func NewPath

func NewPath(fromVersion, toVersion string) (*Path, error)

NewPath creates a new upgrade path.

func (*Path) FromVersion

func (p *Path) FromVersion() string

FromVersion returns the from version.

func (*Path) IsSupported

func (p *Path) IsSupported() bool

IsSupported returns true if the upgrade path is supported.

func (*Path) String

func (p *Path) String() string

func (*Path) ToVersion

func (p *Path) ToVersion() string

ToVersion returns the to version.

Jump to

Keyboard shortcuts

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