majorupgrade

package
v1.28.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package majorupgrade provides the logic for upgrading a PostgreSQL cluster to a new major version.

The upgrade process consists of the following steps:

  1. Delete all Pods in the cluster.
  2. Create and initiate the major upgrade job (BackoffLimit=0, no retries).
  3. Wait for the job to complete.
  4. If the upgrade job completes successfully, start new Pods for the upgraded version. If the user reverts the image to the previous major version, the operator automatically deletes the failed upgrade job and lets the cluster restart.

Index

Constants

This section is empty.

Variables

View Source
var ErrIncoherentMajorUpgradeJob = fmt.Errorf("major upgrade job is missing the target image")

ErrIncoherentMajorUpgradeJob is raised when the major upgrade job is missing the target image

View Source
var ErrNoPrimaryPVCFound = fmt.Errorf("no primary PVC found")

ErrNoPrimaryPVCFound is raised when the list of PVCs doesn't include any primary instance.

Functions

func Reconcile

func Reconcile(
	ctx context.Context,
	c client.Client,
	recorder record.EventRecorder,
	cluster *apiv1.Cluster,
	instances []corev1.Pod,
	pvcs []corev1.PersistentVolumeClaim,
	jobs []batchv1.Job,
) (*ctrl.Result, error)

Reconcile implements the major version upgrade logic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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