upgrade

package
v0.0.0-...-f453aad Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 54 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 tests published operator releases through OLM Classic. It does not import the current controller: expectations describe the selected releases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context, kubeconfig, artifactDir string) error

Cleanup removes only resources recorded by a retained/interrupted run.

func Run

func Run(ctx context.Context, c Config) (result error)

Run executes the standalone upgrade and always attempts diagnostics and cleanup. A successful retained run is cleaned by the outer workflow using Cleanup; a failed run is never retained merely because retention was requested.

Types

type Component

type Component struct {
	Name               string `json:"name"`
	Deployment         string `json:"deployment"`
	Container          string `json:"container"`
	RelatedImage       string `json:"relatedImage"`
	MigrationContainer string `json:"migrationContainer,omitempty"`
	// HashChange is required on To for components present in both releases.
	HashChange *bool       `json:"hashChange,omitempty"`
	HashInputs *HashInputs `json:"hashInputs,omitempty"`
}

Component maps a workload to the related image in its release's CSV.

type Config

type Config struct {
	Kubeconfig, Catalog, FromBundle, ToBundle, Channel, Namespace, ArtifactDir, OPM string
	Podman                                                                          string
	Timeout, PollInterval                                                           time.Duration
	Scenario                                                                        Scenario
}

Config identifies immutable artifacts and an explicitly selected cluster.

func LoadConfig

func LoadConfig() (Config, error)

LoadConfig fails closed on missing inputs. No default kubeconfig, image tags, release pair or component inventory is inferred from the developer's machine.

type HashConfigMap

type HashConfigMap struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

type HashContract

type HashContract struct {
	Bundle string `json:"bundle"`
	Scheme string `json:"scheme"`
}

HashContract binds a test-only hash scheme to one immutable target bundle. The scheme is qualified against that release's source, not this checkout.

type HashInputs

type HashInputs struct {
	ConfigMaps []HashConfigMap `json:"configMaps"`
	Secrets    []HashSecret    `json:"secrets"`
}

HashInputs names the applied configuration and Secret metadata that a target component's release hashes. ConfigMaps are ordered; Secret roles are sorted by the v1 algorithm before hashing.

type HashSecret

type HashSecret struct {
	Role string `json:"role"`
	Name string `json:"name"`
}

type ProbeConfig

type ProbeConfig struct {
	Service    string         `json:"service"`
	Port       int            `json:"port"`
	Collection string         `json:"collection"`
	Body       map[string]any `json:"body"`
	TokenFile  string         `json:"tokenFile,omitempty"`
	CAFile     string         `json:"caFile,omitempty"`
	ServerName string         `json:"serverName,omitempty"`
}

ProbeConfig describes a non-sensitive API record used to prove data survives. A fresh port-forward is opened for each phase, so an old pod cannot mask failure.

type ReleaseExpectations

type ReleaseExpectations struct {
	ComponentStatus bool          `json:"componentStatus"`
	Components      []Component   `json:"components"`
	HashContract    *HashContract `json:"hashContract,omitempty"`
}

ReleaseExpectations enumerates components shipped by one release. Older releases without status.components can explicitly set ComponentStatus=false.

type Scenario

type Scenario struct {
	Fixtures         string              `json:"fixtures"`
	HyperFleetConfig map[string]any      `json:"hyperFleetConfig"`
	From             ReleaseExpectations `json:"from"`
	To               ReleaseExpectations `json:"to"`
	// MaxUnavailable bounds aggregate unavailability caused by added components.
	// Existing components must remain available regardless of this bound.
	MaxUnavailable string      `json:"maxUnavailable"`
	DataProbe      ProbeConfig `json:"dataProbe"`
	SettleDuration string      `json:"settleDuration"`
}

Scenario is a release-pair contract, not a new public operator API. Paths are relative to the scenario file. Fixtures are created in the run namespace.

Jump to

Keyboard shortcuts

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