pgupgrade

package
v0.0.0-...-43879ce Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConditionPGUpgradeProgressing is the type used in a condition to indicate that
	// an Postgres major upgrade is in progress.
	ConditionPGUpgradeProgressing = "Progressing"

	// ConditionPGUpgradeSucceeded is the type used in a condition to indicate the
	// status of a Postgres major upgrade.
	ConditionPGUpgradeSucceeded = "Succeeded"

	LabelPGUpgrade        = labelPrefix + "pgupgrade"
	LabelCluster          = labelPrefix + "cluster"
	LabelRole             = labelPrefix + "role"
	LabelVersion          = labelPrefix + "version"
	LabelPatroni          = labelPrefix + "patroni"
	LabelPGBackRestBackup = labelPrefix + "pgbackrest-backup"
	LabelInstance         = labelPrefix + "instance"

	ReplicaCreate     = "replica-create"
	ContainerDatabase = "database"
)
View Source
const (
	AnnotationAllowUpgrade = "postgres-operator.crunchydata.com/allow-upgrade"
)

Variables

This section is empty.

Functions

func Merge

func Merge(sets ...map[string]string) labels.Set

Merge takes sets of labels and merges them. The last set provided will win in case of conflicts.

Types

type PGUpgradeReconciler

type PGUpgradeReconciler struct {
	Client client.Client
	Owner  client.FieldOwner

	Recorder     record.EventRecorder
	Registration registration.Registration
}

PGUpgradeReconciler reconciles a PGUpgrade object

func (*PGUpgradeReconciler) Reconcile

func (r *PGUpgradeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

Reconcile does the work to move the current state of the world toward the desired state described in a v1beta1.PGUpgrade identified by req.

func (*PGUpgradeReconciler) SetupWithManager

func (r *PGUpgradeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*PGUpgradeReconciler) UpgradeAuthorized

func (r *PGUpgradeReconciler) UpgradeAuthorized(upgrade *v1beta1.PGUpgrade) bool

type World

type World struct {
	Cluster *v1beta1.PostgresCluster
	Upgrade *v1beta1.PGUpgrade

	ClusterNotFound  error
	ClusterPrimary   *appsv1.StatefulSet
	ClusterReplicas  []*appsv1.StatefulSet
	ClusterShutdown  bool
	ReplicasExpected int

	PatroniEndpoints []*corev1.Endpoints
	Jobs             map[string]*batchv1.Job
}

func NewWorld

func NewWorld() *World

Jump to

Keyboard shortcuts

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