upgrade

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package upgrade implements upgrade logic for the CLI.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUpdateAvailable                      = errors.New("no update available")
	ErrDowngradeNotAllowed                    = errors.New("downgrade not allowed")
	ErrCannotUpgradeByMoreThanOneMinorVersion = errors.New("cannot upgrade by more than one minor version")
)

ErrNoUpdateAvailable is returned when no update is available.

Functions

This section is empty.

Types

type Config

type Config struct {
	// KubeconfigPath is a path to a kubeconfig
	KubeconfigPath string
	// InCluster is set if the upgrade process should use in-cluster configuration.
	InCluster bool
	// VersionMetadataURL stores hostname to retrieve version metadata information from.
	VersionMetadataURL string
	// DryRun is set if the upgrade process should only perform pre-upgrade checks and not perform the actual upgrade.
	DryRun bool
	// If set, we will print the pretty output.
	Pretty bool
	// SkipEnvDetection skips detecting the Kubernetes environment.
	SkipEnvDetection bool
	// DisableTelemetry disables telemetry.
	DisableTelemetry bool

	// VersionToUpgrade specifies the version to upgrade to.
	// This version may be ahead by at most one minor version from the current version.
	VersionToUpgrade string

	helm.CLIOptions
}

Config defines configuration required for upgrade command.

type Upgrade

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

Upgrade struct implements upgrade command.

func NewUpgrade

func NewUpgrade(cfg *Config, l *zap.SugaredLogger) (*Upgrade, error)

NewUpgrade returns a new Upgrade struct.

func (*Upgrade) Run

func (u *Upgrade) Run(ctx context.Context) error

Run runs the operators installation process.

Jump to

Keyboard shortcuts

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