v2

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=pgv2.percona.com

Index

Constants

View Source
const (
	PGBackrestAnnotationBackupName = "percona.com/backup-name"
	PGBackrestAnnotationJobName    = "percona.com/backup-job-name"
	PGBackrestAnnotationJobType    = "percona.com/backup-job-type"
)
View Source
const (
	LabelOperatorVersion = labelPrefix + "version"
	LabelPMMSecret       = labelPrefix + "pmm-secret"
)
View Source
const AnnotationAllowUpgrade = "pgv2.percona.com/allow-upgrade"
View Source
const IndexFieldEnvFromSecrets = "pgCluster.envFromSecrets" //nolint:gosec
View Source
const IndexFieldPGCluster = "spec.pgCluster"
View Source
const (
	UserMonitoring = "monitor"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "pgv2.percona.com", Version: "v2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var EnvFromSecretsIndexerFunc client.IndexerFunc = func(obj client.Object) []string {
	cr, ok := obj.(*PerconaPGCluster)
	if !ok {
		return nil
	}
	return cr.EnvFromSecrets()
}
View Source
var PGClusterIndexerFunc client.IndexerFunc = func(obj client.Object) []string {
	backup, ok := obj.(*PerconaPGBackup)
	if !ok {
		return nil
	}
	return []string{backup.Spec.PGCluster}
}

Functions

This section is empty.

Types

type AppState

type AppState string
const (
	AppStateInit     AppState = "initializing"
	AppStatePaused   AppState = "paused"
	AppStateStopping AppState = "stopping"
	AppStateReady    AppState = "ready"
)

type Backups

type Backups struct {
	Enabled *bool `json:"enabled,omitempty"`

	// pgBackRest archive configuration
	// +optional
	PGBackRest PGBackRestArchive `json:"pgbackrest"`

	// Enable tracking latest restorable time
	TrackLatestRestorableTime *bool `json:"trackLatestRestorableTime,omitempty"`
}

Backups struct. +kubebuilder:validation:XValidation:rule="(has(self.enabled) && self.enabled == false) || (has(self.pgbackrest.repos) && size(self.pgbackrest.repos) > 0)",message="At least one repository must be configured when backups are enabled"

func (*Backups) DeepCopy

func (in *Backups) DeepCopy() *Backups

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backups.

func (*Backups) DeepCopyInto

func (in *Backups) DeepCopyInto(out *Backups)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Backups) IsEnabled

func (b Backups) IsEnabled() bool

func (Backups) ToCrunchy

func (b Backups) ToCrunchy(version string) crunchyv1beta1.Backups

type BuiltInExtensionsSpec

type BuiltInExtensionsSpec struct {
	PGStatMonitor    *bool `json:"pg_stat_monitor,omitempty"`
	PGStatStatements *bool `json:"pg_stat_statements,omitempty"`
	PGAudit          *bool `json:"pg_audit,omitempty"`
	PGVector         *bool `json:"pgvector,omitempty"`
	PGRepack         *bool `json:"pg_repack,omitempty"`
}

func (*BuiltInExtensionsSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuiltInExtensionsSpec.

func (*BuiltInExtensionsSpec) DeepCopyInto

func (in *BuiltInExtensionsSpec) DeepCopyInto(out *BuiltInExtensionsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomExtensionSpec

type CustomExtensionSpec struct {
	Name     string `json:"name,omitempty"`
	Version  string `json:"version,omitempty"`
	Checksum string `json:"checksum,omitempty"`
}

func (*CustomExtensionSpec) DeepCopy

func (in *CustomExtensionSpec) DeepCopy() *CustomExtensionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomExtensionSpec.

func (*CustomExtensionSpec) DeepCopyInto

func (in *CustomExtensionSpec) DeepCopyInto(out *CustomExtensionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CustomExtensionsStorageSpec

type CustomExtensionsStorageSpec struct {
	// +kubebuilder:validation:Enum={s3,gcs,azure}
	Type           string                   `json:"type,omitempty"`
	Bucket         string                   `json:"bucket,omitempty"`
	Region         string                   `json:"region,omitempty"`
	Endpoint       string                   `json:"endpoint,omitempty"`
	ForcePathStyle bool                     `json:"forcePathStyle,omitempty"`
	DisableSSL     bool                     `json:"disableSSL,omitempty"`
	Secret         *corev1.SecretProjection `json:"secret,omitempty"`
}

func (*CustomExtensionsStorageSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomExtensionsStorageSpec.

func (*CustomExtensionsStorageSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExtensionsSpec

type ExtensionsSpec struct {
	Image           string                      `json:"image,omitempty"`
	ImagePullPolicy corev1.PullPolicy           `json:"imagePullPolicy,omitempty"`
	Storage         CustomExtensionsStorageSpec `json:"storage,omitempty"`
	BuiltIn         BuiltInExtensionsSpec       `json:"builtin,omitempty"`
	Custom          []CustomExtensionSpec       `json:"custom,omitempty"`
}

func (*ExtensionsSpec) DeepCopy

func (in *ExtensionsSpec) DeepCopy() *ExtensionsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionsSpec.

func (*ExtensionsSpec) DeepCopyInto

func (in *ExtensionsSpec) DeepCopyInto(out *ExtensionsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PGBackRestArchive

type PGBackRestArchive struct {
	// +optional
	Metadata *crunchyv1beta1.Metadata `json:"metadata,omitempty"`

	// Projected volumes containing custom pgBackRest configuration.  These files are mounted
	// under "/etc/pgbackrest/conf.d" alongside any pgBackRest configuration generated by the
	// PostgreSQL Operator:
	// https://pgbackrest.org/configuration.html
	// +optional
	Configuration []corev1.VolumeProjection `json:"configuration,omitempty"`

	// Global pgBackRest configuration settings.  These settings are included in the "global"
	// section of the pgBackRest configuration generated by the PostgreSQL Operator, and then
	// mounted under "/etc/pgbackrest/conf.d":
	// https://pgbackrest.org/configuration.html
	// +optional
	Global map[string]string `json:"global,omitempty"`

	// The image name to use for pgBackRest containers.  Utilized to run
	// pgBackRest repository hosts and backups. The image may also be set using
	// the RELATED_IMAGE_PGBACKREST environment variable
	// +optional
	Image string `json:"image,omitempty"`

	// +optional
	InitContainer *crunchyv1beta1.InitContainerSpec `json:"initContainer,omitempty"` // K8SPG-613

	// Jobs field allows configuration for all backup jobs
	// +optional
	Jobs *crunchyv1beta1.BackupJobs `json:"jobs,omitempty"`

	// Defines a pgBackRest repository
	// +listType=map
	// +listMapKey=name
	// +optional
	Repos []crunchyv1beta1.PGBackRestRepo `json:"repos"`

	// Defines configuration for a pgBackRest dedicated repository host.  This section is only
	// applicable if at least one "volume" (i.e. PVC-based) repository is defined in the "repos"
	// section, therefore enabling a dedicated repository host Deployment.
	// +optional
	RepoHost *crunchyv1beta1.PGBackRestRepoHost `json:"repoHost,omitempty"`

	// Defines details for manual pgBackRest backup Jobs
	// +optional
	Manual *crunchyv1beta1.PGBackRestManualBackup `json:"manual,omitempty"`

	// Defines details for performing an in-place restore using pgBackRest
	// +optional
	Restore *crunchyv1beta1.PGBackRestRestore `json:"restore,omitempty"`

	// Deprecated: Use Containers instead
	// +optional
	Sidecars *crunchyv1beta1.PGBackRestSidecars `json:"sidecars,omitempty"`

	// Configuration for pgBackRest sidecar containers
	// +optional
	Containers *crunchyv1beta1.PGBackRestSidecars `json:"containers,omitempty"`

	// K8SPG-833
	Env []corev1.EnvVar `json:"env,omitempty"`
	// K8SPG-833
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
}

func (*PGBackRestArchive) DeepCopy

func (in *PGBackRestArchive) DeepCopy() *PGBackRestArchive

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBackRestArchive.

func (*PGBackRestArchive) DeepCopyInto

func (in *PGBackRestArchive) DeepCopyInto(out *PGBackRestArchive)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PGBackupState

type PGBackupState string
const (
	BackupNew       PGBackupState = ""
	BackupStarting  PGBackupState = "Starting"
	BackupRunning   PGBackupState = "Running"
	BackupFailed    PGBackupState = "Failed"
	BackupSucceeded PGBackupState = "Succeeded"
)

type PGBackupStorageType

type PGBackupStorageType string
const (
	PGBackupStorageTypeFilesystem PGBackupStorageType = "filesystem"
	PGBackupStorageTypeAzure      PGBackupStorageType = "azure"
	PGBackupStorageTypeGCS        PGBackupStorageType = "gcs"
	PGBackupStorageTypeS3         PGBackupStorageType = "s3"
)

type PGBackupType

type PGBackupType string
const (
	PGBackupTypeFull         PGBackupType = "full"
	PGBackupTypeDifferential PGBackupType = "differential"
	PGBackupTypeIncremental  PGBackupType = "incremental"
)

type PGBouncerSpec

type PGBouncerSpec struct {
	// +optional
	Metadata *crunchyv1beta1.Metadata `json:"metadata,omitempty"`

	// Scheduling constraints of a PgBouncer pod. Changing this value causes
	// PgBouncer to restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Configuration settings for the PgBouncer process. Changes to any of these
	// values will be automatically reloaded without validation. Be careful, as
	// you may put PgBouncer into an unusable state.
	// More info: https://www.pgbouncer.org/usage.html#reload
	// +optional
	Config crunchyv1beta1.PGBouncerConfiguration `json:"config,omitempty"`

	// Custom sidecars for a PgBouncer pod. Changing this value causes
	// PgBouncer to restart.
	// +optional
	Sidecars []corev1.Container `json:"sidecars,omitempty"`

	// Configuration for pgBouncer default sidecar containers.
	// +optional
	Containers *crunchyv1beta1.PGBouncerSidecars `json:"containers,omitempty"`

	// A secret projection containing a certificate and key with which to encrypt
	// connections to PgBouncer. The "tls.crt", "tls.key", and "ca.crt" paths must
	// be PEM-encoded certificates and keys. Changing this value causes PgBouncer
	// to restart.
	// More info: https://kubernetes.io/docs/concepts/configuration/secret/#projection-of-secret-keys-to-specific-paths
	// +optional
	CustomTLSSecret *corev1.SecretProjection `json:"customTLSSecret,omitempty"`

	// Allow SUPERUSERs to connect through PGBouncer.
	// +optional
	ExposeSuperusers bool `json:"exposeSuperusers,omitempty"`

	// Name of a container image that can run PgBouncer 1.15 or newer. Changing
	// this value causes PgBouncer to restart. The image may also be set using
	// the RELATED_IMAGE_PGBOUNCER environment variable.
	// More info: https://kubernetes.io/docs/concepts/containers/images
	// +optional
	Image string `json:"image,omitempty"`

	// Port on which PgBouncer should listen for client connections. Changing
	// this value causes PgBouncer to restart.
	// +optional
	// +kubebuilder:default=5432
	// +kubebuilder:validation:Minimum=1024
	Port *int32 `json:"port,omitempty"`

	// Priority class name for the pgBouncer pod. Changing this value causes
	// PostgreSQL to restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// Number of desired PgBouncer pods.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=0
	Replicas *int32 `json:"replicas,omitempty"`

	// Minimum number of pods that should be available at a time.
	// Defaults to one when the replicas field is greater than one.
	// +optional
	MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"`

	// Compute resources of a PgBouncer container. Changing this value causes
	// PgBouncer to restart.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Specification of the service that exposes PgBouncer.
	// +optional
	ServiceExpose *ServiceExpose `json:"expose,omitempty"`

	// Tolerations of a PgBouncer pod. Changing this value causes PgBouncer to
	// restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Topology spread constraints of a PgBouncer pod. Changing this value causes
	// PgBouncer to restart.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// SecurityContext defines the security settings for PGBouncer pods.
	// +optional
	SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`

	Env     []corev1.EnvVar        `json:"env,omitempty"`
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
}

func (*PGBouncerSpec) DeepCopy

func (in *PGBouncerSpec) DeepCopy() *PGBouncerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBouncerSpec.

func (*PGBouncerSpec) DeepCopyInto

func (in *PGBouncerSpec) DeepCopyInto(out *PGBouncerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PGBouncerSpec) ToCrunchy

func (p *PGBouncerSpec) ToCrunchy(version string) *crunchyv1beta1.PGBouncerPodSpec

type PGBouncerStatus

type PGBouncerStatus struct {
	Size int32 `json:"size"`

	Ready int32 `json:"ready"`
}

func (*PGBouncerStatus) DeepCopy

func (in *PGBouncerStatus) DeepCopy() *PGBouncerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBouncerStatus.

func (*PGBouncerStatus) DeepCopyInto

func (in *PGBouncerStatus) DeepCopyInto(out *PGBouncerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PGInstanceSetSpec

type PGInstanceSetSpec struct {
	// +optional
	Metadata *crunchyv1beta1.Metadata `json:"metadata,omitempty"`

	// Name that associates this set of PostgreSQL pods. This field is optional
	// when only one instance set is defined. Each instance set in a cluster
	// must have a unique name. The combined length of this and the cluster name
	// must be 46 characters or less.
	// +optional
	// +kubebuilder:default=""
	// +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?)?$`
	Name string `json:"name"`

	// Scheduling constraints of a PostgreSQL pod. Changing this value causes
	// PostgreSQL to restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Custom sidecars for PostgreSQL instance pods. Changing this value causes
	// PostgreSQL to restart.
	// +optional
	Sidecars []corev1.Container `json:"sidecars,omitempty"`

	// Configuration for instance default sidecar containers.
	// +optional
	Containers *crunchyv1beta1.InstanceSidecars `json:"containers,omitempty"`

	// Additional init containers for PostgreSQL instance pods. Changing this value causes
	// PostgreSQL to restart.
	// +optional
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// Priority class name for the PostgreSQL pod. Changing this value causes
	// PostgreSQL to restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// Number of desired PostgreSQL pods.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	Replicas *int32 `json:"replicas,omitempty"`

	// Minimum number of pods that should be available at a time.
	// Defaults to one when the replicas field is greater than one.
	// +optional
	MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"`

	// Compute resources of a PostgreSQL container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Tolerations of a PostgreSQL pod. Changing this value causes PostgreSQL to restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Topology spread constraints of a PostgreSQL pod. Changing this value causes
	// PostgreSQL to restart.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// Defines a separate PersistentVolumeClaim for PostgreSQL's write-ahead log.
	// More info: https://www.postgresql.org/docs/current/wal.html
	// +optional
	WALVolumeClaimSpec *corev1.PersistentVolumeClaimSpec `json:"walVolumeClaimSpec,omitempty"`

	// Defines a PersistentVolumeClaim for PostgreSQL data.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
	// +kubebuilder:validation:Required
	DataVolumeClaimSpec corev1.PersistentVolumeClaimSpec `json:"dataVolumeClaimSpec"`

	// The list of tablespaces volumes to mount for this postgrescluster
	// This field requires enabling TablespaceVolumes feature gate
	// +listType=map
	// +listMapKey=name
	// +optional
	TablespaceVolumes []crunchyv1beta1.TablespaceVolume `json:"tablespaceVolumes,omitempty"`

	// The list of volume mounts to mount to PostgreSQL instance pods. Changing this value causes
	// PostgreSQL to restart.
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// SecurityContext defines the security settings for a PostgreSQL pod.
	// +optional
	SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`

	// K8SPG-708
	// InitContainer defines the init container for the instance container of a PostgreSQL pod.
	// +optional
	InitContainer *crunchyv1beta1.InitContainerSpec `json:"initContainer,omitempty"`

	Env     []corev1.EnvVar        `json:"env,omitempty"`
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
}

func (*PGInstanceSetSpec) DeepCopy

func (in *PGInstanceSetSpec) DeepCopy() *PGInstanceSetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGInstanceSetSpec.

func (*PGInstanceSetSpec) DeepCopyInto

func (in *PGInstanceSetSpec) DeepCopyInto(out *PGInstanceSetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PGInstanceSetSpec) ToCrunchy

type PGInstanceSets

type PGInstanceSets []PGInstanceSetSpec

+listType=map +listMapKey=name +kubebuilder:validation:MinItems=1

func (PGInstanceSets) DeepCopy

func (in PGInstanceSets) DeepCopy() PGInstanceSets

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGInstanceSets.

func (PGInstanceSets) DeepCopyInto

func (in PGInstanceSets) DeepCopyInto(out *PGInstanceSets)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PGInstanceSets) ToCrunchy

type PGProxySpec

type PGProxySpec struct {
	// Defines a PgBouncer proxy and connection pooler.
	PGBouncer *PGBouncerSpec `json:"pgBouncer"`
}

func (*PGProxySpec) DeepCopy

func (in *PGProxySpec) DeepCopy() *PGProxySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGProxySpec.

func (*PGProxySpec) DeepCopyInto

func (in *PGProxySpec) DeepCopyInto(out *PGProxySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PGProxySpec) ToCrunchy

func (p *PGProxySpec) ToCrunchy(version string) *crunchyv1beta1.PostgresProxySpec

type PGRestoreState

type PGRestoreState string
const (
	RestoreNew       PGRestoreState = ""
	RestoreStarting  PGRestoreState = "Starting"
	RestoreRunning   PGRestoreState = "Running"
	RestoreFailed    PGRestoreState = "Failed"
	RestoreSucceeded PGRestoreState = "Succeeded"
)

type PITRestoreDateTime

type PITRestoreDateTime struct {
	*metav1.Time `json:",inline"`
}

+kubebuilder:validation:Type=string

func (*PITRestoreDateTime) DeepCopy

func (in *PITRestoreDateTime) DeepCopy() *PITRestoreDateTime

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PITRestoreDateTime.

func (*PITRestoreDateTime) DeepCopyInto

func (in *PITRestoreDateTime) DeepCopyInto(out *PITRestoreDateTime)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PITRestoreDateTime) MarshalJSON

func (t *PITRestoreDateTime) MarshalJSON() ([]byte, error)

func (PITRestoreDateTime) OpenAPISchemaFormat

func (PITRestoreDateTime) OpenAPISchemaFormat() string

func (PITRestoreDateTime) OpenAPISchemaType

func (PITRestoreDateTime) OpenAPISchemaType() []string

func (*PITRestoreDateTime) UnmarshalJSON

func (t *PITRestoreDateTime) UnmarshalJSON(b []byte) (err error)

type PMMQuerySource

type PMMQuerySource string
const (
	PgStatStatements PMMQuerySource = "pgstatstatements"
)

type PMMSpec

type PMMSpec struct {
	// +kubebuilder:validation:Required
	Enabled bool `json:"enabled"`

	// +kubebuilder:validation:Required
	Image string `json:"image"`

	// ImagePullPolicy is used to determine when Kubernetes will attempt to
	// pull (download) container images.
	// More info: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
	// +kubebuilder:validation:Enum={Always,Never,IfNotPresent}
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// +kubebuilder:validation:Required
	ServerHost string `json:"serverHost,omitempty"`

	// +optional
	CustomClusterName string `json:"customClusterName,omitempty"`

	// +optional
	PostgresParams string `json:"postgresParams,omitempty"`

	// +kubebuilder:validation:Required
	Secret string `json:"secret,omitempty"`

	// +kubebuilder:validation:Enum={pgstatmonitor,pgstatstatements}
	// +kubebuilder:default=pgstatmonitor
	// +kubebuilder:validation:Required
	QuerySource PMMQuerySource `json:"querySource,omitempty"`

	// Compute resources of a PMM container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +optional
	ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`

	// +optional
	RuntimeClassName *string `json:"runtimeClassName,omitempty"`
}

func (*PMMSpec) DeepCopy

func (in *PMMSpec) DeepCopy() *PMMSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PMMSpec.

func (*PMMSpec) DeepCopyInto

func (in *PMMSpec) DeepCopyInto(out *PMMSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Patroni

type Patroni struct {
	// +optional
	Status *crunchyv1beta1.PatroniStatus `json:"status,omitempty"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Version string `json:"version"`
}

func (*Patroni) DeepCopy

func (in *Patroni) DeepCopy() *Patroni

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patroni.

func (*Patroni) DeepCopyInto

func (in *Patroni) DeepCopyInto(out *Patroni)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGBackup

type PerconaPGBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec   PerconaPGBackupSpec   `json:"spec"`
	Status PerconaPGBackupStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=pg-backup +kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=".spec.pgCluster",description="Cluster name" +kubebuilder:printcolumn:name="Repo",type=string,JSONPath=".spec.repoName",description="Repo name" +kubebuilder:printcolumn:name="Destination",type=string,JSONPath=".status.destination",description="Backup destination" +kubebuilder:printcolumn:name="Status",type=string,JSONPath=".status.state",description="Job status" +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".status.backupType",description="Backup type" +kubebuilder:printcolumn:name="Completed",type=date,JSONPath=".status.completed",description="Completed time" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=".metadata.creationTimestamp",description="Created time" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +operator-sdk:csv:customresourcedefinitions:order=2 +operator-sdk:csv:customresourcedefinitions:resources={{CronJob,v1beta1},{Job,v1}}

PerconaPGBackup is the CRD that defines a Percona PostgreSQL Backup

func (*PerconaPGBackup) CompareVersion

func (b *PerconaPGBackup) CompareVersion(ver string) int

func (*PerconaPGBackup) DeepCopy

func (in *PerconaPGBackup) DeepCopy() *PerconaPGBackup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGBackup.

func (*PerconaPGBackup) DeepCopyInto

func (in *PerconaPGBackup) DeepCopyInto(out *PerconaPGBackup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGBackup) DeepCopyObject

func (in *PerconaPGBackup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PerconaPGBackup) Default

func (b *PerconaPGBackup) Default()

type PerconaPGBackupList

type PerconaPGBackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PerconaPGBackup `json:"items"`
}

+kubebuilder:object:root=true PerconaPGBackupList contains a list of PerconaPGBackup

func (*PerconaPGBackupList) DeepCopy

func (in *PerconaPGBackupList) DeepCopy() *PerconaPGBackupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGBackupList.

func (*PerconaPGBackupList) DeepCopyInto

func (in *PerconaPGBackupList) DeepCopyInto(out *PerconaPGBackupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGBackupList) DeepCopyObject

func (in *PerconaPGBackupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PerconaPGBackupSpec

type PerconaPGBackupSpec struct {
	PGCluster string `json:"pgCluster"`

	// The name of the pgBackRest repo to run the backup command against.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^repo[1-4]
	RepoName string `json:"repoName"`

	// Command line options to include when running the pgBackRest backup command.
	// https://pgbackrest.org/command.html#command-backup
	// +optional
	Options []string `json:"options,omitempty"`
}

func (*PerconaPGBackupSpec) DeepCopy

func (in *PerconaPGBackupSpec) DeepCopy() *PerconaPGBackupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGBackupSpec.

func (*PerconaPGBackupSpec) DeepCopyInto

func (in *PerconaPGBackupSpec) DeepCopyInto(out *PerconaPGBackupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGBackupStatus

type PerconaPGBackupStatus struct {
	JobName              string                         `json:"jobName,omitempty"`
	State                PGBackupState                  `json:"state,omitempty"`
	Error                string                         `json:"error,omitempty"`
	CompletedAt          *metav1.Time                   `json:"completed,omitempty"`
	Destination          string                         `json:"destination,omitempty"`
	BackupType           PGBackupType                   `json:"backupType,omitempty"`
	StorageType          PGBackupStorageType            `json:"storageType,omitempty"`
	Repo                 *crunchyv1beta1.PGBackRestRepo `json:"repo,omitempty"`
	Image                string                         `json:"image,omitempty"`
	BackupName           string                         `json:"backupName,omitempty"`
	CRVersion            string                         `json:"crVersion,omitempty"`
	LatestRestorableTime PITRestoreDateTime             `json:"latestRestorableTime,omitempty"`
}

func (*PerconaPGBackupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGBackupStatus.

func (*PerconaPGBackupStatus) DeepCopyInto

func (in *PerconaPGBackupStatus) DeepCopyInto(out *PerconaPGBackupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGCluster

type PerconaPGCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec   PerconaPGClusterSpec   `json:"spec"`
	Status PerconaPGClusterStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=pg +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=".status.host" +kubebuilder:printcolumn:name="Status",type=string,JSONPath=".status.state" +kubebuilder:printcolumn:name="Postgres",type=string,JSONPath=".status.postgres.ready" +kubebuilder:printcolumn:name="PGBouncer",type=string,JSONPath=".status.pgbouncer.ready" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +operator-sdk:csv:customresourcedefinitions:order=1 +operator-sdk:csv:customresourcedefinitions:resources={{ConfigMap,v1},{Secret,v1},{Service,v1},{CronJob,v1beta1},{Deployment,v1},{Job,v1},{StatefulSet,v1},{PersistentVolumeClaim,v1}}

PerconaPGCluster is the CRD that defines a Percona PG Cluster

func (*PerconaPGCluster) CompareVersion

func (cr *PerconaPGCluster) CompareVersion(ver string) int

func (*PerconaPGCluster) DeepCopy

func (in *PerconaPGCluster) DeepCopy() *PerconaPGCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGCluster.

func (*PerconaPGCluster) DeepCopyInto

func (in *PerconaPGCluster) DeepCopyInto(out *PerconaPGCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGCluster) DeepCopyObject

func (in *PerconaPGCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PerconaPGCluster) Default

func (cr *PerconaPGCluster) Default()

func (*PerconaPGCluster) EnvFromSecrets

func (cr *PerconaPGCluster) EnvFromSecrets() []string

func (*PerconaPGCluster) PMMEnabled

func (cr *PerconaPGCluster) PMMEnabled() bool

func (*PerconaPGCluster) PostgresImage

func (cr *PerconaPGCluster) PostgresImage() string

func (*PerconaPGCluster) ToCrunchy

func (PerconaPGCluster) UserMonitoring

func (pgc PerconaPGCluster) UserMonitoring() string

UserMonitoring constructs the monitoring user.

func (*PerconaPGCluster) Version

func (cr *PerconaPGCluster) Version() *gover.Version

type PerconaPGClusterList

type PerconaPGClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PerconaPGCluster `json:"items"`
}

+kubebuilder:object:root=true PostgresClusterList contains a list of PostgresCluster

func (*PerconaPGClusterList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGClusterList.

func (*PerconaPGClusterList) DeepCopyInto

func (in *PerconaPGClusterList) DeepCopyInto(out *PerconaPGClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGClusterList) DeepCopyObject

func (in *PerconaPGClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PerconaPGClusterSpec

type PerconaPGClusterSpec struct {
	// +optional
	Metadata *crunchyv1beta1.Metadata `json:"metadata,omitempty"`

	// Version of the operator. Update this to new version after operator
	// upgrade to apply changes to Kubernetes objects. Default is the latest
	// version.
	// +optional
	CRVersion string `json:"crVersion,omitempty"`

	InitContainer *crunchyv1beta1.InitContainerSpec `json:"initContainer,omitempty"`

	// The image name to use for PostgreSQL containers.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
	Image string `json:"image,omitempty"`

	// ImagePullPolicy is used to determine when Kubernetes will attempt to
	// pull (download) container images.
	// More info: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
	// +kubebuilder:validation:Enum={Always,Never,IfNotPresent}
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// The image pull secrets used to pull from a private registry
	// Changing this value causes all running pods to restart.
	// https://k8s.io/docs/tasks/configure-pod-container/pull-image-private-registry/
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	TLSOnly bool `json:"tlsOnly,omitempty"`

	// The port on which PostgreSQL should listen.
	// +optional
	// +kubebuilder:default=5432
	// +kubebuilder:validation:Minimum=1024
	Port *int32 `json:"port,omitempty"`

	// Specification of the service that exposes the PostgreSQL primary instance.
	// +optional
	Expose *ServiceExpose `json:"expose,omitempty"`

	// Specification of the service that exposes PostgreSQL replica instances
	// +optional
	ExposeReplicas *ServiceExpose `json:"exposeReplicas,omitempty"`

	// The major version of PostgreSQL installed in the PostgreSQL image
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=12
	// +kubebuilder:validation:Maximum=17
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	PostgresVersion int `json:"postgresVersion"`

	Secrets SecretsSpec `json:"secrets,omitempty"`

	// Run this cluster as a read-only copy of an existing cluster or archive.
	// +optional
	Standby *crunchyv1beta1.PostgresStandbySpec `json:"standby,omitempty"`

	// Whether or not the PostgreSQL cluster is being deployed to an OpenShift
	// environment. If the field is unset, the operator will automatically
	// detect the environment.
	// +optional
	OpenShift *bool `json:"openshift,omitempty"`

	// +optional
	Patroni *crunchyv1beta1.PatroniSpec `json:"patroni,omitempty"`

	// Users to create inside PostgreSQL and the databases they should access.
	// The default creates one user that can access one database matching the
	// PostgresCluster name. An empty list creates no users. Removing a user
	// from this list does NOT drop the user nor revoke their access.
	// +listType=map
	// +listMapKey=name
	// +optional
	Users []crunchyv1beta1.PostgresUserSpec `json:"users,omitempty"`

	// DatabaseInitSQL defines a ConfigMap containing custom SQL that will
	// be run after the cluster is initialized. This ConfigMap must be in the same
	// namespace as the cluster.
	// +optional
	DatabaseInitSQL *crunchyv1beta1.DatabaseInitSQL `json:"databaseInitSQL,omitempty"`

	// Whether or not the PostgreSQL cluster should be stopped.
	// When this is true, workloads are scaled to zero and CronJobs
	// are suspended.
	// Other resources, such as Services and Volumes, remain in place.
	// +optional
	Pause *bool `json:"pause,omitempty"`

	// Suspends the rollout and reconciliation of changes made to the
	// PostgresCluster spec.
	// +optional
	Unmanaged *bool `json:"unmanaged,omitempty"`

	// Specifies a data source for bootstrapping the PostgreSQL cluster.
	// +optional
	DataSource *crunchyv1beta1.DataSource `json:"dataSource,omitempty"`

	// Specifies one or more sets of PostgreSQL pods that replicate data for
	// this cluster.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	InstanceSets PGInstanceSets `json:"instances"`

	// The specification of a proxy that connects to PostgreSQL.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Proxy *PGProxySpec `json:"proxy,omitempty"`

	// PostgreSQL backup configuration
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Backups Backups `json:"backups"`

	// The specification of PMM sidecars.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	PMM *PMMSpec `json:"pmm,omitempty"`

	// The specification of extensions.
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	// +optional
	Extensions ExtensionsSpec `json:"extensions,omitempty"`

	// Indicates whether schemas are automatically created for the user
	// specified in `spec.users` across all databases associated with that user.
	// +optional
	AutoCreateUserSchema *bool `json:"autoCreateUserSchema,omitempty"`
}

+kubebuilder:validation:XValidation:rule="!has(self.users) || self.postgresVersion >= 15 || self.users.all(u, !has(u.grantPublicSchemaAccess) || !u.grantPublicSchemaAccess)",message="PostgresVersion must be >= 15 if grantPublicSchemaAccess exists and is true"

func (*PerconaPGClusterSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGClusterSpec.

func (*PerconaPGClusterSpec) DeepCopyInto

func (in *PerconaPGClusterSpec) DeepCopyInto(out *PerconaPGClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGClusterStatus

type PerconaPGClusterStatus struct {
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Postgres PostgresStatus `json:"postgres"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	PGBouncer PGBouncerStatus `json:"pgbouncer"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	State AppState `json:"state"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	// Deprecated: Use Patroni instead. This field will be removed in a future release.
	PatroniVersion string `json:"patroniVersion"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Patroni Patroni `json:"patroni,omitempty"`

	// Status information for pgBackRest
	// +optional
	PGBackRest *crunchyv1beta1.PGBackRestStatus `json:"pgbackrest,omitempty"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Host string `json:"host"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	InstalledCustomExtensions []string `json:"installedCustomExtensions"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=status
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*PerconaPGClusterStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGClusterStatus.

func (*PerconaPGClusterStatus) DeepCopyInto

func (in *PerconaPGClusterStatus) DeepCopyInto(out *PerconaPGClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGRestore

type PerconaPGRestore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec   PerconaPGRestoreSpec   `json:"spec"`
	Status PerconaPGRestoreStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=pg-restore +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +operator-sdk:csv:customresourcedefinitions:order=3 +operator-sdk:csv:customresourcedefinitions:resources={{CronJob,v1beta1},{Job,v1}} +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.pgCluster",description="Cluster name" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.state",description="Job status" +kubebuilder:printcolumn:name="Completed",type="date",JSONPath=".status.completed",description="Completed time" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

PerconaPGRestore is the CRD that defines a Percona PostgreSQL Restore

func (*PerconaPGRestore) DeepCopy

func (in *PerconaPGRestore) DeepCopy() *PerconaPGRestore

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGRestore.

func (*PerconaPGRestore) DeepCopyInto

func (in *PerconaPGRestore) DeepCopyInto(out *PerconaPGRestore)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGRestore) DeepCopyObject

func (in *PerconaPGRestore) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PerconaPGRestoreList

type PerconaPGRestoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PerconaPGRestore `json:"items"`
}

+kubebuilder:object:root=true PerconaPGRestoreList contains a list of PerconaPGRestore

func (*PerconaPGRestoreList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGRestoreList.

func (*PerconaPGRestoreList) DeepCopyInto

func (in *PerconaPGRestoreList) DeepCopyInto(out *PerconaPGRestoreList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGRestoreList) DeepCopyObject

func (in *PerconaPGRestoreList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PerconaPGRestoreSpec

type PerconaPGRestoreSpec struct {
	// The name of the PerconaPGCluster to perform restore.
	// +kubebuilder:validation:Required
	PGCluster string `json:"pgCluster"`

	// The name of the pgBackRest repo within the source PostgresCluster that contains the backups
	// that should be utilized to perform a pgBackRest restore when initializing the data source
	// for the new PostgresCluster.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^repo[1-4]
	RepoName string `json:"repoName"`

	// Command line options to include when running the pgBackRest restore command.
	// https://pgbackrest.org/command.html#command-restore
	// +optional
	Options []string `json:"options,omitempty"`
}

func (*PerconaPGRestoreSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGRestoreSpec.

func (*PerconaPGRestoreSpec) DeepCopyInto

func (in *PerconaPGRestoreSpec) DeepCopyInto(out *PerconaPGRestoreSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGRestoreStatus

type PerconaPGRestoreStatus struct {
	JobName     string         `json:"jobName,omitempty"`
	State       PGRestoreState `json:"state,omitempty"`
	CompletedAt *metav1.Time   `json:"completed,omitempty"`
}

func (*PerconaPGRestoreStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGRestoreStatus.

func (*PerconaPGRestoreStatus) DeepCopyInto

func (in *PerconaPGRestoreStatus) DeepCopyInto(out *PerconaPGRestoreStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGUpgrade

type PerconaPGUpgrade struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec   PerconaPGUpgradeSpec   `json:"spec"`
	Status PerconaPGUpgradeStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status PerconaPGUpgrade is the Schema for the perconapgupgrades API

func (*PerconaPGUpgrade) DeepCopy

func (in *PerconaPGUpgrade) DeepCopy() *PerconaPGUpgrade

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGUpgrade.

func (*PerconaPGUpgrade) DeepCopyInto

func (in *PerconaPGUpgrade) DeepCopyInto(out *PerconaPGUpgrade)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGUpgrade) DeepCopyObject

func (in *PerconaPGUpgrade) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PerconaPGUpgradeList

type PerconaPGUpgradeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PerconaPGUpgrade `json:"items"`
}

+kubebuilder:object:root=true PerconaPGRestoreList contains a list of PerconaPGRestore

func (*PerconaPGUpgradeList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGUpgradeList.

func (*PerconaPGUpgradeList) DeepCopyInto

func (in *PerconaPGUpgradeList) DeepCopyInto(out *PerconaPGUpgradeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PerconaPGUpgradeList) DeepCopyObject

func (in *PerconaPGUpgradeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PerconaPGUpgradeSpec

type PerconaPGUpgradeSpec struct {
	// +optional
	Metadata *crunchyv1beta1.Metadata `json:"metadata,omitempty"`

	// The name of the cluster to be updated
	// +required
	// +kubebuilder:validation:MinLength=1
	PostgresClusterName string `json:"postgresClusterName"`

	// The image name to use for major PostgreSQL upgrades.
	// +required
	Image *string `json:"image"`

	// ImagePullPolicy is used to determine when Kubernetes will attempt to
	// pull (download) container images.
	// More info: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
	// +kubebuilder:validation:Enum={Always,Never,IfNotPresent}
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// The image pull secrets used to pull from a private registry.
	// Changing this value causes all running PGUpgrade pods to restart.
	// https://k8s.io/docs/tasks/configure-pod-container/pull-image-private-registry/
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// The major version of PostgreSQL before the upgrade.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=12
	// +kubebuilder:validation:Maximum=16
	FromPostgresVersion int `json:"fromPostgresVersion"`

	// The major version of PostgreSQL to be upgraded to.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=13
	// +kubebuilder:validation:Maximum=17
	ToPostgresVersion int `json:"toPostgresVersion"`

	// The image to use for PostgreSQL containers after upgrade.
	// +required
	ToPostgresImage string `json:"toPostgresImage"`

	// The image to use for PgBouncer containers after upgrade.
	// +required
	ToPgBouncerImage string `json:"toPgBouncerImage"`

	// The image to use for PgBackRest containers after upgrade.
	// +required
	ToPgBackRestImage string `json:"toPgBackRestImage"`

	// Resource requirements for the PGUpgrade container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Scheduling constraints of the PGUpgrade pod.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Priority class name for the PGUpgrade pod. Changing this
	// value causes PGUpgrade pod to restart.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// Tolerations of the PGUpgrade pod.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Init container to run before the upgrade container.
	// +optional
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// The list of volume mounts to mount to upgrade pod.
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

func (*PerconaPGUpgradeSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGUpgradeSpec.

func (*PerconaPGUpgradeSpec) DeepCopyInto

func (in *PerconaPGUpgradeSpec) DeepCopyInto(out *PerconaPGUpgradeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PerconaPGUpgradeStatus

type PerconaPGUpgradeStatus struct {
	crunchyv1beta1.PGUpgradeStatus `json:",inline"`
}

func (*PerconaPGUpgradeStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaPGUpgradeStatus.

func (*PerconaPGUpgradeStatus) DeepCopyInto

func (in *PerconaPGUpgradeStatus) DeepCopyInto(out *PerconaPGUpgradeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostgresInstanceSetStatus

type PostgresInstanceSetStatus struct {
	Name string `json:"name"`

	Size int32 `json:"size"`

	Ready int32 `json:"ready"`
}

func (*PostgresInstanceSetStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresInstanceSetStatus.

func (*PostgresInstanceSetStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostgresStatus

type PostgresStatus struct {
	// +optional
	Size int32 `json:"size"`

	// +optional
	Ready int32 `json:"ready"`

	// +optional
	InstanceSets []PostgresInstanceSetStatus `json:"instances"`

	// +optional
	Version int `json:"version"`

	// +optional
	ImageID string `json:"imageID"`
}

func (*PostgresStatus) DeepCopy

func (in *PostgresStatus) DeepCopy() *PostgresStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresStatus.

func (*PostgresStatus) DeepCopyInto

func (in *PostgresStatus) DeepCopyInto(out *PostgresStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretsSpec

type SecretsSpec struct {
	// The secret containing the Certificates and Keys to encrypt PostgreSQL
	// traffic will need to contain the server TLS certificate, TLS key and the
	// Certificate Authority certificate with the data keys set to tls.crt,
	// tls.key and ca.crt, respectively. It will then be mounted as a volume
	// projection to the '/pgconf/tls' directory. For more information on
	// Kubernetes secret projections, please see
	// https://k8s.io/docs/concepts/configuration/secret/#projection-of-secret-keys-to-specific-paths
	// NOTE: If CustomTLSSecret is provided, CustomReplicationClientTLSSecret
	// MUST be provided and the ca.crt provided must be the same.
	// +optional
	CustomTLSSecret *corev1.SecretProjection `json:"customTLSSecret,omitempty"`

	// The secret containing the replication client certificates and keys for
	// secure connections to the PostgreSQL server. It will need to contain the
	// client TLS certificate, TLS key and the Certificate Authority certificate
	// with the data keys set to tls.crt, tls.key and ca.crt, respectively.
	// NOTE: If CustomReplicationClientTLSSecret is provided, CustomTLSSecret
	// MUST be provided and the ca.crt provided must be the same.
	// +optional
	CustomReplicationClientTLSSecret *corev1.SecretProjection `json:"customReplicationTLSSecret,omitempty"`

	// The secret containing the root CA certificate and key for
	// secure connections to the PostgreSQL server. It will need to contain the
	// CA TLS certificate and CA TLS key with the data keys set to
	// root.crt and root.key, respectively.
	// +optional
	CustomRootCATLSSecret *corev1.SecretProjection `json:"customRootCATLSSecret,omitempty"`
}

func (*SecretsSpec) DeepCopy

func (in *SecretsSpec) DeepCopy() *SecretsSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsSpec.

func (*SecretsSpec) DeepCopyInto

func (in *SecretsSpec) DeepCopyInto(out *SecretsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceExpose

type ServiceExpose struct {
	crunchyv1beta1.Metadata `json:",inline"`

	// The port on which this service is exposed when type is NodePort or
	// LoadBalancer. Value must be in-range and not in use or the operation will
	// fail. If unspecified, a port will be allocated if this Service requires one.
	// - https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
	// +optional
	NodePort *int32 `json:"nodePort,omitempty"`

	// More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
	//
	// +optional
	// +kubebuilder:default=ClusterIP
	// +kubebuilder:validation:Enum={ClusterIP,NodePort,LoadBalancer}
	Type string `json:"type,omitempty"`

	// LoadBalancerClass specifies the class of the load balancer implementation
	// to be used. This field is supported for Service Type LoadBalancer only.
	//
	// More info:
	// https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
	// +optional
	LoadBalancerClass *string `json:"loadBalancerClass,omitempty"`

	// LoadBalancerSourceRanges is a list of IP CIDRs allowed access to load.
	// This field will be ignored if the cloud-provider does not support the feature.
	// +optional
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
}

func (*ServiceExpose) DeepCopy

func (in *ServiceExpose) DeepCopy() *ServiceExpose

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceExpose.

func (*ServiceExpose) DeepCopyInto

func (in *ServiceExpose) DeepCopyInto(out *ServiceExpose)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceExpose) ToCrunchy

func (s *ServiceExpose) ToCrunchy(version string) *crunchyv1beta1.ServiceSpec

Jump to

Keyboard shortcuts

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