ivyupgrade

package
v0.0.0-...-30d1bac Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

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

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

	LabelIvyUpgrade       = labelPrefix + "ivyupgrade"
	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 = "ivory-operator.ivorysql.org/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 IvyUpgradeReconciler

type IvyUpgradeReconciler struct {
	client.Client
	Owner  client.FieldOwner
	Scheme *runtime.Scheme
}

IvyUpgradeReconciler reconciles a IvyUpgrade object

func (*IvyUpgradeReconciler) Reconcile

func (r *IvyUpgradeReconciler) 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.IvyUpgrade identified by req.

func (*IvyUpgradeReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type JSON6902

type JSON6902 []interface{}

JSON6902 represents a JSON Patch according to RFC 6902; the same as k8s.io/apimachinery/pkg/types.JSONPatchType.

func NewJSONPatch

func NewJSONPatch() *JSON6902

NewJSONPatch creates a new JSON Patch according to RFC 6902; the same as k8s.io/apimachinery/pkg/types.JSONPatchType.

func (*JSON6902) Add

func (patch *JSON6902) Add(path ...string) func(value interface{}) *JSON6902

func (JSON6902) Bytes

func (patch JSON6902) Bytes() ([]byte, error)

Bytes returns the JSON representation of patch.

func (JSON6902) Data

func (patch JSON6902) Data(client.Object) ([]byte, error)

Data returns the JSON representation of patch.

func (JSON6902) IsEmpty

func (patch JSON6902) IsEmpty() bool

IsEmpty returns true when patch has no operations.

func (*JSON6902) Remove

func (patch *JSON6902) Remove(path ...string) *JSON6902

func (*JSON6902) Replace

func (patch *JSON6902) Replace(path ...string) func(value interface{}) *JSON6902

func (JSON6902) Type

func (patch JSON6902) Type() types.PatchType

Type returns k8s.io/apimachinery/pkg/types.JSONPatchType.

type World

type World struct {
	Cluster *v1beta1.IvoryCluster
	Upgrade *v1beta1.IvyUpgrade

	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