v1beta1

package
v5.1.2-bit Latest Latest
Warning

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

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

Documentation

Overview

Package v1beta1 contains API Schema definitions for the postgres-operator v1beta1 API group +kubebuilder:object:generate=true +groupName=postgres-operator.crunchydata.com

Index

Constants

View Source
const (
	PatroniSwitchoverTypeFailover   = "Failover"
	PatroniSwitchoverTypeSwitchover = "Switchover"
)

PatroniSwitchover types.

View Source
const (
	PostgresPasswordTypeAlphaNumeric = "AlphaNumeric"
	PostgresPasswordTypeASCII        = "ASCII"
)

PostgresPasswordSpec types.

View Source
const (
	PersistentVolumeResizing   = "PersistentVolumeResizing"
	PostgresClusterProgressing = "Progressing"
	ProxyAvailable             = "ProxyAvailable"
)

PostgresClusterStatus condition types.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "postgres-operator.crunchydata.com", Version: "v1beta1"}

	// 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
)

Functions

This section is empty.

Types

type BackupJobs

type BackupJobs struct {
	// Resource limits for backup jobs. Includes manual, scheduled and replica
	// create backups
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Priority class name for the pgBackRest backup Job pods.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

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

	// Tolerations of pgBackRest backup Job pods.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

func (*BackupJobs) DeepCopy

func (in *BackupJobs) DeepCopy() *BackupJobs

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

func (*BackupJobs) DeepCopyInto

func (in *BackupJobs) DeepCopyInto(out *BackupJobs)

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

type Backups

type Backups struct {

	// pgBackRest archive configuration
	// +kubebuilder:validation:Required
	PGBackRest PGBackRestArchive `json:"pgbackrest"`
}

Backups defines a PostgreSQL archive configuration

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.

type DataSource

type DataSource struct {
	// Defines a pgBackRest cloud-based data source that can be used to pre-populate the
	// the PostgreSQL data directory for a new PostgreSQL cluster using a pgBackRest restore.
	// The PGBackRest field is incompatible with the PostgresCluster field: only one
	// data source can be used for pre-populating a new PostgreSQL cluster
	// +optional
	PGBackRest *PGBackRestDataSource `json:"pgbackrest,omitempty"`

	// Defines a pgBackRest data source that can be used to pre-populate the PostgreSQL data
	// directory for a new PostgreSQL cluster using a pgBackRest restore.
	// The PGBackRest field is incompatible with the PostgresCluster field: only one
	// data source can be used for pre-populating a new PostgreSQL cluster
	// +optional
	PostgresCluster *PostgresClusterDataSource `json:"postgresCluster,omitempty"`

	// Defines any existing volumes to reuse for this PostgresCluster.
	// +optional
	Volumes *DataSourceVolumes `json:"volumes,omitempty"`
}

DataSource defines data sources for a new PostgresCluster.

func (*DataSource) DeepCopy

func (in *DataSource) DeepCopy() *DataSource

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

func (*DataSource) DeepCopyInto

func (in *DataSource) DeepCopyInto(out *DataSource)

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

type DataSourceVolume

type DataSourceVolume struct {
	// The existing PVC name.
	PVCName string `json:"pvcName"`

	// The existing directory. When not set, a move Job is not created for the
	// associated volume.
	// +optional
	Directory string `json:"directory,omitempty"`
}

DataSourceVolume defines the PVC name and data diretory path for an existing cluster volume.

func (*DataSourceVolume) DeepCopy

func (in *DataSourceVolume) DeepCopy() *DataSourceVolume

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

func (*DataSourceVolume) DeepCopyInto

func (in *DataSourceVolume) DeepCopyInto(out *DataSourceVolume)

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

type DataSourceVolumes

type DataSourceVolumes struct {
	// Defines the existing pgData volume and directory to use in the current
	// PostgresCluster.
	// +optional
	PGDataVolume *DataSourceVolume `json:"pgDataVolume,omitempty"`

	// Defines the existing pg_wal volume and directory to use in the current
	// PostgresCluster. Note that a defined pg_wal volume MUST be accompanied by
	// a pgData volume.
	// +optional
	PGWALVolume *DataSourceVolume `json:"pgWALVolume,omitempty"`

	// Defines the existing pgBackRest repo volume and directory to use in the
	// current PostgresCluster.
	// +optional
	PGBackRestVolume *DataSourceVolume `json:"pgBackRestVolume,omitempty"`
}

DataSourceVolumes defines any existing volumes to reuse for this PostgresCluster.

func (*DataSourceVolumes) DeepCopy

func (in *DataSourceVolumes) DeepCopy() *DataSourceVolumes

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

func (*DataSourceVolumes) DeepCopyInto

func (in *DataSourceVolumes) DeepCopyInto(out *DataSourceVolumes)

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

type DatabaseInitSQL

type DatabaseInitSQL struct {
	// Name is the name of a ConfigMap
	// +required
	Name string `json:"name"`

	// Key is the ConfigMap data key that points to a SQL string
	// +required
	Key string `json:"key"`
}

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.

func (*DatabaseInitSQL) DeepCopy

func (in *DatabaseInitSQL) DeepCopy() *DatabaseInitSQL

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

func (*DatabaseInitSQL) DeepCopyInto

func (in *DatabaseInitSQL) DeepCopyInto(out *DatabaseInitSQL)

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

type ExporterSpec

type ExporterSpec struct {

	// Projected volumes containing custom PostgreSQL Exporter configuration.  Currently supports
	// the customization of PostgreSQL Exporter queries. If a "queries.yaml" file is detected in
	// any volume projected using this field, it will be loaded using the "extend.query-path" flag:
	// https://github.com/prometheus-community/postgres_exporter#flags
	// Changing the values of field causes PostgreSQL and the exporter to restart.
	// +optional
	Configuration []corev1.VolumeProjection `json:"configuration,omitempty"`

	// The image name to use for crunchy-postgres-exporter containers. The image may
	// also be set using the RELATED_IMAGE_PGEXPORTER environment variable.
	// +optional
	Image string `json:"image,omitempty"`

	// Changing this value causes PostgreSQL and the exporter to restart.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

func (*ExporterSpec) DeepCopy

func (in *ExporterSpec) DeepCopy() *ExporterSpec

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

func (*ExporterSpec) DeepCopyInto

func (in *ExporterSpec) DeepCopyInto(out *ExporterSpec)

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

type InstanceSidecars

type InstanceSidecars struct {
	// Defines the configuration for the replica cert copy sidecar container
	// +optional
	ReplicaCertCopy *Sidecar `json:"replicaCertCopy,omitempty"`
}

InstanceSidecars defines the configuration for instance sidecar containers

func (*InstanceSidecars) DeepCopy

func (in *InstanceSidecars) DeepCopy() *InstanceSidecars

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

func (*InstanceSidecars) DeepCopyInto

func (in *InstanceSidecars) DeepCopyInto(out *InstanceSidecars)

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

type Metadata

type Metadata struct {
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

Metadata contains metadata for PostgresCluster resources

func (*Metadata) DeepCopy

func (in *Metadata) DeepCopy() *Metadata

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

func (*Metadata) DeepCopyInto

func (in *Metadata) DeepCopyInto(out *Metadata)

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

func (*Metadata) GetAnnotationsOrNil

func (meta *Metadata) GetAnnotationsOrNil() map[string]string

GetAnnotationsOrNil gets annotations from a Metadata pointer, if Metadata hasn't been set return nil

func (*Metadata) GetLabelsOrNil

func (meta *Metadata) GetLabelsOrNil() map[string]string

GetLabelsOrNil gets labels from a Metadata pointer, if Metadata hasn't been set return nil

type MonitoringSpec

type MonitoringSpec struct {
	// +optional
	PGMonitor *PGMonitorSpec `json:"pgmonitor,omitempty"`
}

MonitoringSpec is a union of the supported PostgreSQL Monitoring tools

func (*MonitoringSpec) DeepCopy

func (in *MonitoringSpec) DeepCopy() *MonitoringSpec

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

func (*MonitoringSpec) DeepCopyInto

func (in *MonitoringSpec) DeepCopyInto(out *MonitoringSpec)

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

type MonitoringStatus

type MonitoringStatus struct {
	// +optional
	ExporterConfiguration string `json:"exporterConfiguration,omitempty"`
}

MonitoringStatus is the current state of PostgreSQL cluster monitoring tool configuration

func (*MonitoringStatus) DeepCopy

func (in *MonitoringStatus) DeepCopy() *MonitoringStatus

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

func (*MonitoringStatus) DeepCopyInto

func (in *MonitoringStatus) DeepCopyInto(out *MonitoringStatus)

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

type PGAdminConfiguration

type PGAdminConfiguration struct {
	// Files allows the user to mount projected volumes into the pgAdmin
	// container so that files can be referenced by pgAdmin as needed.
	Files []corev1.VolumeProjection `json:"files,omitempty"`

	// A Secret containing the value for the LDAP_BIND_PASSWORD setting.
	// More info: https://www.pgadmin.org/docs/pgadmin4/latest/ldap.html
	// +optional
	LDAPBindPassword *corev1.SecretKeySelector `json:"ldapBindPassword,omitempty"`

	// Settings for the pgAdmin server process. Keys should be uppercase and
	// values must be constants.
	// More info: https://www.pgadmin.org/docs/pgadmin4/latest/config_py.html
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:Type=object
	Settings SchemalessObject `json:"settings,omitempty"`
}

PGAdminConfiguration represents pgAdmin configuration files.

func (*PGAdminConfiguration) DeepCopy

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

func (*PGAdminConfiguration) DeepCopyInto

func (in *PGAdminConfiguration) DeepCopyInto(out *PGAdminConfiguration)

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

type PGAdminPodSpec

type PGAdminPodSpec struct {
	// +optional
	Metadata *Metadata `json:"metadata,omitempty"`

	// Scheduling constraints of a pgAdmin pod. Changing this value causes
	// pgAdmin 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 pgAdmin process. Changes to any of these
	// values will be loaded without validation. Be careful, as
	// you may put pgAdmin into an unusable state.
	// +optional
	Config PGAdminConfiguration `json:"config,omitempty"`

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

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

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

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

	// Compute resources of a pgAdmin container. Changing this value causes
	// pgAdmin 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 pgAdmin.
	// +optional
	Service *ServiceSpec `json:"service,omitempty"`

	// Tolerations of a pgAdmin pod. Changing this value causes pgAdmin 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 pgAdmin pod. Changing this value causes
	// pgAdmin to restart.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

PGAdminPodSpec defines the desired state of a pgAdmin deployment.

func (*PGAdminPodSpec) DeepCopy

func (in *PGAdminPodSpec) DeepCopy() *PGAdminPodSpec

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

func (*PGAdminPodSpec) DeepCopyInto

func (in *PGAdminPodSpec) DeepCopyInto(out *PGAdminPodSpec)

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

func (*PGAdminPodSpec) Default

func (s *PGAdminPodSpec) Default()

Default sets the port and replica count for pgAdmin if not set

type PGAdminPodStatus

type PGAdminPodStatus struct {

	// Hash that indicates which users have been installed into pgAdmin.
	UsersRevision string `json:"usersRevision,omitempty"`
}

PGAdminPodStatus represents the observed state of a pgAdmin deployment.

func (*PGAdminPodStatus) DeepCopy

func (in *PGAdminPodStatus) DeepCopy() *PGAdminPodStatus

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

func (*PGAdminPodStatus) DeepCopyInto

func (in *PGAdminPodStatus) DeepCopyInto(out *PGAdminPodStatus)

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

type PGBackRestArchive

type PGBackRestArchive struct {
	// +optional
	Metadata *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"`

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

	// Defines a pgBackRest repository
	// +kubebuilder:validation:MinItems=1
	// +listType=map
	// +listMapKey=name
	Repos []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 *PGBackRestRepoHost `json:"repoHost,omitempty"`

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

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

	// Configuration for pgBackRest sidecar containers
	// +optional
	Sidecars *PGBackRestSidecars `json:"sidecars,omitempty"`
}

PGBackRestArchive defines a pgBackRest archive configuration

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 PGBackRestBackupSchedules

type PGBackRestBackupSchedules struct {

	// Defines the Cron schedule for a full pgBackRest backup.
	// Follows the standard Cron schedule syntax:
	// https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax
	// +optional
	// +kubebuilder:validation:MinLength=6
	Full *string `json:"full,omitempty"`

	// Defines the Cron schedule for a differential pgBackRest backup.
	// Follows the standard Cron schedule syntax:
	// https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax
	// +optional
	// +kubebuilder:validation:MinLength=6
	Differential *string `json:"differential,omitempty"`

	// Defines the Cron schedule for an incremental pgBackRest backup.
	// Follows the standard Cron schedule syntax:
	// https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax
	// +optional
	// +kubebuilder:validation:MinLength=6
	Incremental *string `json:"incremental,omitempty"`
}

PGBackRestBackupSchedules defines a pgBackRest scheduled backup

func (*PGBackRestBackupSchedules) DeepCopy

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

func (*PGBackRestBackupSchedules) DeepCopyInto

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

type PGBackRestDataSource

type PGBackRestDataSource struct {
	// 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"`

	// Defines a pgBackRest repository
	// +kubebuilder:validation:Required
	Repo PGBackRestRepo `json:"repo"`

	// The name of an existing pgBackRest stanza to use as the data source for the new PostgresCluster.
	// Defaults to `db` if not provided.
	// +kubebuilder:default="db"
	Stanza string `json:"stanza"`

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

	// Resource requirements for the pgBackRest restore Job.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

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

	// Priority class name for the pgBackRest restore Job 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"`

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

PGBackRestDataSource defines a pgBackRest configuration specifically for restoring from cloud-based data source

func (*PGBackRestDataSource) DeepCopy

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

func (*PGBackRestDataSource) DeepCopyInto

func (in *PGBackRestDataSource) DeepCopyInto(out *PGBackRestDataSource)

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

type PGBackRestJobStatus

type PGBackRestJobStatus struct {

	// A unique identifier for the manual backup as provided using the "pgbackrest-backup"
	// annotation when initiating a backup.
	// +kubebuilder:validation:Required
	ID string `json:"id"`

	// Specifies whether or not the Job is finished executing (does not indicate success or
	// failure).
	// +kubebuilder:validation:Required
	Finished bool `json:"finished"`

	// Represents the time the manual backup Job was acknowledged by the Job controller.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents the time the manual backup Job was determined by the Job controller
	// to be completed.  This field is only set if the backup completed successfully.
	// Additionally, it is represented in RFC3339 form and is in UTC.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// The number of actively running manual backup Pods.
	// +optional
	Active int32 `json:"active,omitempty"`

	// The number of Pods for the manual backup Job that reached the "Succeeded" phase.
	// +optional
	Succeeded int32 `json:"succeeded,omitempty"`

	// The number of Pods for the manual backup Job that reached the "Failed" phase.
	// +optional
	Failed int32 `json:"failed,omitempty"`
}

PGBackRestJobStatus contains information about the state of a pgBackRest Job.

func (*PGBackRestJobStatus) DeepCopy

func (in *PGBackRestJobStatus) DeepCopy() *PGBackRestJobStatus

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

func (*PGBackRestJobStatus) DeepCopyInto

func (in *PGBackRestJobStatus) DeepCopyInto(out *PGBackRestJobStatus)

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

type PGBackRestManualBackup

type PGBackRestManualBackup struct {
	// 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"`
}

PGBackRestManualBackup contains information that is used for creating a pgBackRest backup that is invoked manually (i.e. it's unscheduled).

func (*PGBackRestManualBackup) DeepCopy

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

func (*PGBackRestManualBackup) DeepCopyInto

func (in *PGBackRestManualBackup) DeepCopyInto(out *PGBackRestManualBackup)

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

type PGBackRestRepo

type PGBackRestRepo struct {

	// The name of the the repository
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^repo[1-4]
	Name string `json:"name"`

	// Defines the schedules for the pgBackRest backups
	// Full, Differential and Incremental backup types are supported:
	// https://pgbackrest.org/user-guide.html#concept/backup
	// +optional
	BackupSchedules *PGBackRestBackupSchedules `json:"schedules,omitempty"`

	// Represents a pgBackRest repository that is created using Azure storage
	// +optional
	Azure *RepoAzure `json:"azure,omitempty"`

	// Represents a pgBackRest repository that is created using Google Cloud Storage
	// +optional
	GCS *RepoGCS `json:"gcs,omitempty"`

	// RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible)
	// storage
	// +optional
	S3 *RepoS3 `json:"s3,omitempty"`

	// Represents a pgBackRest repository that is created using a PersistentVolumeClaim
	// +optional
	Volume *RepoPVC `json:"volume,omitempty"`
}

PGBackRestRepo represents a pgBackRest repository. Only one of its members may be specified.

func (*PGBackRestRepo) DeepCopy

func (in *PGBackRestRepo) DeepCopy() *PGBackRestRepo

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

func (*PGBackRestRepo) DeepCopyInto

func (in *PGBackRestRepo) DeepCopyInto(out *PGBackRestRepo)

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

type PGBackRestRepoHost

type PGBackRestRepoHost struct {

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

	// Priority class name for the pgBackRest repo host 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"`

	// Resource requirements for a pgBackRest repository host
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Tolerations of a PgBackRest repo host pod. Changing this value causes a 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 Dedicated repo host pod. Changing this
	// value causes the repo host to restart.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// ConfigMap containing custom SSH configuration.
	// Deprecated: Repository hosts use mTLS for encryption, authentication, and authorization.
	// +optional
	SSHConfiguration *corev1.ConfigMapProjection `json:"sshConfigMap,omitempty"`

	// Secret containing custom SSH keys.
	// Deprecated: Repository hosts use mTLS for encryption, authentication, and authorization.
	// +optional
	SSHSecret *corev1.SecretProjection `json:"sshSecret,omitempty"`
}

PGBackRestRepoHost represents a pgBackRest dedicated repository host

func (*PGBackRestRepoHost) DeepCopy

func (in *PGBackRestRepoHost) DeepCopy() *PGBackRestRepoHost

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

func (*PGBackRestRepoHost) DeepCopyInto

func (in *PGBackRestRepoHost) DeepCopyInto(out *PGBackRestRepoHost)

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

type PGBackRestRestore

type PGBackRestRestore struct {

	// Whether or not in-place pgBackRest restores are enabled for this PostgresCluster.
	// +kubebuilder:default=false
	Enabled *bool `json:"enabled"`

	*PostgresClusterDataSource `json:",inline"`
}

PGBackRestRestore defines an in-place restore for the PostgresCluster.

func (*PGBackRestRestore) DeepCopy

func (in *PGBackRestRestore) DeepCopy() *PGBackRestRestore

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

func (*PGBackRestRestore) DeepCopyInto

func (in *PGBackRestRestore) DeepCopyInto(out *PGBackRestRestore)

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

type PGBackRestScheduledBackupStatus

type PGBackRestScheduledBackupStatus struct {

	// The name of the associated pgBackRest scheduled backup CronJob
	// +kubebuilder:validation:Required
	CronJobName string `json:"cronJobName,omitempty"`

	// The name of the associated pgBackRest repository
	// +kubebuilder:validation:Required
	RepoName string `json:"repo,omitempty"`

	// The pgBackRest backup type for this Job
	// +kubebuilder:validation:Required
	Type string `json:"type,omitempty"`

	// Represents the time the manual backup Job was acknowledged by the Job controller.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents the time the manual backup Job was determined by the Job controller
	// to be completed.  This field is only set if the backup completed successfully.
	// Additionally, it is represented in RFC3339 form and is in UTC.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// The number of actively running manual backup Pods.
	// +optional
	Active int32 `json:"active,omitempty"`

	// The number of Pods for the manual backup Job that reached the "Succeeded" phase.
	// +optional
	Succeeded int32 `json:"succeeded,omitempty"`

	// The number of Pods for the manual backup Job that reached the "Failed" phase.
	// +optional
	Failed int32 `json:"failed,omitempty"`
}

func (*PGBackRestScheduledBackupStatus) DeepCopy

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

func (*PGBackRestScheduledBackupStatus) DeepCopyInto

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

type PGBackRestSidecars

type PGBackRestSidecars struct {
	// Defines the configuration for the pgBackRest sidecar container
	// +optional
	PGBackRest *Sidecar `json:"pgbackrest,omitempty"`

	// Defines the configuration for the pgBackRest config sidecar container
	// +optional
	PGBackRestConfig *Sidecar `json:"pgbackrestConfig,omitempty"`
}

PGBackRestSidecars defines the configuration for pgBackRest sidecar containers

func (*PGBackRestSidecars) DeepCopy

func (in *PGBackRestSidecars) DeepCopy() *PGBackRestSidecars

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

func (*PGBackRestSidecars) DeepCopyInto

func (in *PGBackRestSidecars) DeepCopyInto(out *PGBackRestSidecars)

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

type PGBackRestStatus

type PGBackRestStatus struct {

	// Status information for manual backups
	// +optional
	ManualBackup *PGBackRestJobStatus `json:"manualBackup,omitempty"`

	// Status information for scheduled backups
	// +optional
	ScheduledBackups []PGBackRestScheduledBackupStatus `json:"scheduledBackups,omitempty"`

	// Status information for the pgBackRest dedicated repository host
	// +optional
	RepoHost *RepoHostStatus `json:"repoHost,omitempty"`

	// Status information for pgBackRest repositories
	// +optional
	// +listType=map
	// +listMapKey=name
	Repos []RepoStatus `json:"repos,omitempty"`

	// Status information for in-place restores
	// +optional
	Restore *PGBackRestJobStatus `json:"restore,omitempty"`
}

PGBackRestStatus defines the status of pgBackRest within a PostgresCluster

func (*PGBackRestStatus) DeepCopy

func (in *PGBackRestStatus) DeepCopy() *PGBackRestStatus

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

func (*PGBackRestStatus) DeepCopyInto

func (in *PGBackRestStatus) DeepCopyInto(out *PGBackRestStatus)

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

type PGBouncerConfiguration

type PGBouncerConfiguration struct {

	// Files to mount under "/etc/pgbouncer". When specified, settings in the
	// "pgbouncer.ini" file are loaded before all others. From there, other
	// files may be included by absolute path. Changing these references causes
	// PgBouncer to restart, but changes to the file contents are automatically
	// reloaded.
	// More info: https://www.pgbouncer.org/config.html#include-directive
	// +optional
	Files []corev1.VolumeProjection `json:"files,omitempty"`

	// Settings that apply to the entire PgBouncer process.
	// More info: https://www.pgbouncer.org/config.html
	// +optional
	Global map[string]string `json:"global,omitempty"`

	// PgBouncer database definitions. The key is the database requested by a
	// client while the value is a libpq-styled connection string. The special
	// key "*" acts as a fallback. When this field is empty, PgBouncer is
	// configured with a single "*" entry that connects to the primary
	// PostgreSQL instance.
	// More info: https://www.pgbouncer.org/config.html#section-databases
	// +optional
	Databases map[string]string `json:"databases,omitempty"`

	// Connection settings specific to particular users.
	// More info: https://www.pgbouncer.org/config.html#section-users
	// +optional
	Users map[string]string `json:"users,omitempty"`
}

PGBouncerConfiguration represents PgBouncer configuration files.

func (*PGBouncerConfiguration) DeepCopy

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

func (*PGBouncerConfiguration) DeepCopyInto

func (in *PGBouncerConfiguration) DeepCopyInto(out *PGBouncerConfiguration)

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

type PGBouncerPodSpec

type PGBouncerPodSpec struct {
	// +optional
	Metadata *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 PGBouncerConfiguration `json:"config,omitempty"`

	// Custom sidecars for a PgBouncer pod. Changing this value causes
	// PgBouncer to restart.
	// +optional
	Containers []corev1.Container `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"`

	// 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
	Service *ServiceSpec `json:"service,omitempty"`

	// Configuration for pgBouncer sidecar containers
	// +optional
	Sidecars *PGBouncerSidecars `json:"sidecars,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"`
}

PGBouncerPodSpec defines the desired state of a PgBouncer connection pooler.

func (*PGBouncerPodSpec) DeepCopy

func (in *PGBouncerPodSpec) DeepCopy() *PGBouncerPodSpec

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

func (*PGBouncerPodSpec) DeepCopyInto

func (in *PGBouncerPodSpec) DeepCopyInto(out *PGBouncerPodSpec)

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

func (*PGBouncerPodSpec) Default

func (s *PGBouncerPodSpec) Default()

Default returns the default port for PgBouncer (5432) if a port is not explicitly set

type PGBouncerPodStatus

type PGBouncerPodStatus struct {

	// Identifies the revision of PgBouncer assets that have been installed into
	// PostgreSQL.
	PostgreSQLRevision string `json:"postgresRevision,omitempty"`

	// Total number of ready pods.
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// Total number of non-terminated pods.
	Replicas int32 `json:"replicas,omitempty"`
}

func (*PGBouncerPodStatus) DeepCopy

func (in *PGBouncerPodStatus) DeepCopy() *PGBouncerPodStatus

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

func (*PGBouncerPodStatus) DeepCopyInto

func (in *PGBouncerPodStatus) DeepCopyInto(out *PGBouncerPodStatus)

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

type PGBouncerSidecars

type PGBouncerSidecars struct {
	// Defines the configuration for the pgBouncer config sidecar container
	// +optional
	PGBouncerConfig *Sidecar `json:"pgbouncerConfig,omitempty"`
}

PGBouncerSidecars defines the configuration for pgBouncer sidecar containers

func (*PGBouncerSidecars) DeepCopy

func (in *PGBouncerSidecars) DeepCopy() *PGBouncerSidecars

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

func (*PGBouncerSidecars) DeepCopyInto

func (in *PGBouncerSidecars) DeepCopyInto(out *PGBouncerSidecars)

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

type PGMonitorSpec

type PGMonitorSpec struct {
	// +optional
	Exporter *ExporterSpec `json:"exporter,omitempty"`
}

PGMonitorSpec defines the desired state of the pgMonitor tool suite

func (*PGMonitorSpec) DeepCopy

func (in *PGMonitorSpec) DeepCopy() *PGMonitorSpec

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

func (*PGMonitorSpec) DeepCopyInto

func (in *PGMonitorSpec) DeepCopyInto(out *PGMonitorSpec)

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

type PatroniSpec

type PatroniSpec struct {
	// Patroni dynamic configuration settings. Changes to this value will be
	// automatically reloaded without validation. Changes to certain PostgreSQL
	// parameters cause PostgreSQL to restart.
	// More info: https://patroni.readthedocs.io/en/latest/SETTINGS.html
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:Type=object
	DynamicConfiguration SchemalessObject `json:"dynamicConfiguration,omitempty"`

	// TTL of the cluster leader lock. "Think of it as the
	// length of time before initiation of the automatic failover process."
	// Changing this value causes PostgreSQL to restart.
	// +optional
	// +kubebuilder:default=30
	// +kubebuilder:validation:Minimum=3
	LeaderLeaseDurationSeconds *int32 `json:"leaderLeaseDurationSeconds,omitempty"`

	// The port on which Patroni should listen.
	// Changing this value causes PostgreSQL to restart.
	// +optional
	// +kubebuilder:default=8008
	// +kubebuilder:validation:Minimum=1024
	Port *int32 `json:"port,omitempty"`

	// The interval for refreshing the leader lock and applying
	// dynamicConfiguration. Must be less than leaderLeaseDurationSeconds.
	// Changing this value causes PostgreSQL to restart.
	// +optional
	// +kubebuilder:default=10
	// +kubebuilder:validation:Minimum=1
	SyncPeriodSeconds *int32 `json:"syncPeriodSeconds,omitempty"`

	// Switchover gives options to perform ad hoc switchovers in a PostgresCluster.
	// +optional
	Switchover *PatroniSwitchover `json:"switchover,omitempty"`
}

func (*PatroniSpec) DeepCopy

func (in *PatroniSpec) DeepCopy() *PatroniSpec

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

func (*PatroniSpec) DeepCopyInto

func (in *PatroniSpec) DeepCopyInto(out *PatroniSpec)

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

func (*PatroniSpec) Default

func (s *PatroniSpec) Default()

Default sets the default values for certain Patroni configuration attributes, including: - Lock Lease Duration - Patroni's API port - Frequency of syncing with Kube API

type PatroniStatus

type PatroniStatus struct {

	// The PostgreSQL system identifier reported by Patroni.
	// +optional
	SystemIdentifier string `json:"systemIdentifier,omitempty"`

	// Tracks the execution of the switchover requests.
	// +optional
	Switchover *string `json:"switchover,omitempty"`

	// Tracks the current timeline during switchovers
	// +optional
	SwitchoverTimeline *int64 `json:"switchoverTimeline,omitempty"`
}

func (*PatroniStatus) DeepCopy

func (in *PatroniStatus) DeepCopy() *PatroniStatus

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

func (*PatroniStatus) DeepCopyInto

func (in *PatroniStatus) DeepCopyInto(out *PatroniStatus)

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

type PatroniSwitchover

type PatroniSwitchover struct {

	// Whether or not the operator should allow switchovers in a PostgresCluster
	// +required
	Enabled bool `json:"enabled"`

	// The instance that should become primary during a switchover. This field is
	// optional when Type is "Switchover" and required when Type is "Failover".
	// When it is not specified, a healthy replica is automatically selected.
	// +optional
	TargetInstance *string `json:"targetInstance,omitempty"`

	// Type of switchover to perform. Valid options are Switchover and Failover.
	// "Switchover" changes the primary instance of a healthy PostgresCluster.
	// "Failover" forces a particular instance to be primary, regardless of other
	// factors. A TargetInstance must be specified to failover.
	// NOTE: The Failover type is reserved as the "last resort" case.
	// +kubebuilder:validation:Enum={Switchover,Failover}
	// +kubebuilder:default:=Switchover
	// +optional
	Type string `json:"type,omitempty"`
}

func (*PatroniSwitchover) DeepCopy

func (in *PatroniSwitchover) DeepCopy() *PatroniSwitchover

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

func (*PatroniSwitchover) DeepCopyInto

func (in *PatroniSwitchover) DeepCopyInto(out *PatroniSwitchover)

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

type PostgresAdditionalConfig

type PostgresAdditionalConfig struct {
	Files []corev1.VolumeProjection `json:"files,omitempty"`
}

func (*PostgresAdditionalConfig) DeepCopy

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

func (*PostgresAdditionalConfig) DeepCopyInto

func (in *PostgresAdditionalConfig) DeepCopyInto(out *PostgresAdditionalConfig)

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

type PostgresCluster

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

	Spec   PostgresClusterSpec   `json:"spec,omitempty"`
	Status PostgresClusterStatus `json:"status,omitempty"`
}

PostgresCluster is the Schema for the postgresclusters API

func (*PostgresCluster) DeepCopy

func (in *PostgresCluster) DeepCopy() *PostgresCluster

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

func (*PostgresCluster) DeepCopyInto

func (in *PostgresCluster) DeepCopyInto(out *PostgresCluster)

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

func (*PostgresCluster) DeepCopyObject

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

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

func (*PostgresCluster) Default

func (c *PostgresCluster) Default()

Default implements "sigs.k8s.io/controller-runtime/pkg/webhook.Defaulter" so a webhook can be registered for the type. - https://book.kubebuilder.io/reference/webhook-overview.html

type PostgresClusterDataSource

type PostgresClusterDataSource struct {

	// The name of an existing PostgresCluster to use as the data source for the new PostgresCluster.
	// Defaults to the name of the PostgresCluster being created if not provided.
	// +optional
	ClusterName string `json:"clusterName,omitempty"`

	// The namespace of the cluster specified as the data source using the clusterName field.
	// Defaults to the namespace of the PostgresCluster being created if not provided.
	// +optional
	ClusterNamespace string `json:"clusterNamespace,omitempty"`

	// 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"`

	// Resource requirements for the pgBackRest restore Job.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

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

	// Priority class name for the pgBackRest restore Job 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"`

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

PostgresClusterDataSource defines a data source for bootstrapping PostgreSQL clusters using a an existing PostgresCluster.

func (*PostgresClusterDataSource) DeepCopy

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

func (*PostgresClusterDataSource) DeepCopyInto

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

type PostgresClusterList

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

PostgresClusterList contains a list of PostgresCluster

func (*PostgresClusterList) DeepCopy

func (in *PostgresClusterList) DeepCopy() *PostgresClusterList

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

func (*PostgresClusterList) DeepCopyInto

func (in *PostgresClusterList) DeepCopyInto(out *PostgresClusterList)

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

func (*PostgresClusterList) DeepCopyObject

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

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

type PostgresClusterSpec

type PostgresClusterSpec struct {
	// +optional
	Metadata *Metadata `json:"metadata,omitempty"`

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

	// PostgreSQL backup configuration
	// +kubebuilder:validation:Required
	Backups Backups `json:"backups"`

	// 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"`

	// 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 *DatabaseInitSQL `json:"databaseInitSQL,omitempty"`
	// Whether or not the PostgreSQL cluster should use the defined default
	// scheduling constraints. If the field is unset or false, the default
	// scheduling constraints will be used in addition to any custom constraints
	// provided.
	// +optional
	DisableDefaultPodScheduling *bool `json:"disableDefaultPodScheduling,omitempty"`

	// The image name to use for PostgreSQL containers. When omitted, the value
	// comes from an operator environment variable. For standard PostgreSQL images,
	// the format is RELATED_IMAGE_POSTGRES_{postgresVersion},
	// e.g. RELATED_IMAGE_POSTGRES_13. For PostGIS enabled PostgreSQL images,
	// the format is RELATED_IMAGE_POSTGRES_{postgresVersion}_GIS_{postGISVersion},
	// e.g. RELATED_IMAGE_POSTGRES_13_GIS_3.1.
	// +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}
	// +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"`

	// Specifies one or more sets of PostgreSQL pods that replicate data for
	// this cluster.
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MinItems=1
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=2
	InstanceSets []PostgresInstanceSetSpec `json:"instances"`

	// 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 *PatroniSpec `json:"patroni,omitempty"`

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

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

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

	// The PostGIS extension version installed in the PostgreSQL image.
	// When image is not set, indicates a PostGIS enabled image will be used.
	// +optional
	PostGISVersion string `json:"postGISVersion,omitempty"`

	// The specification of a proxy that connects to PostgreSQL.
	// +optional
	Proxy *PostgresProxySpec `json:"proxy,omitempty"`

	// The specification of a user interface that connects to PostgreSQL.
	// +optional
	UserInterface *UserInterfaceSpec `json:"userInterface,omitempty"`

	// The specification of monitoring tools that connect to PostgreSQL
	// +optional
	Monitoring *MonitoringSpec `json:"monitoring,omitempty"`

	// Specification of the service that exposes the PostgreSQL primary instance.
	// +optional
	Service *ServiceSpec `json:"service,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
	Shutdown *bool `json:"shutdown,omitempty"`

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

	// A list of group IDs applied to the process of a container. These can be
	// useful when accessing shared file systems with constrained permissions.
	// More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context
	// +optional
	SupplementalGroups []int64 `json:"supplementalGroups,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 []PostgresUserSpec `json:"users,omitempty"`

	Config PostgresAdditionalConfig `json:"config,omitempty"`
}

PostgresClusterSpec defines the desired state of PostgresCluster

func (*PostgresClusterSpec) DeepCopy

func (in *PostgresClusterSpec) DeepCopy() *PostgresClusterSpec

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

func (*PostgresClusterSpec) DeepCopyInto

func (in *PostgresClusterSpec) DeepCopyInto(out *PostgresClusterSpec)

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

func (*PostgresClusterSpec) Default

func (s *PostgresClusterSpec) Default()

Default defines several key default values for a Postgres cluster.

type PostgresClusterStatus

type PostgresClusterStatus struct {

	// Identifies the databases that have been installed into PostgreSQL.
	DatabaseRevision string `json:"databaseRevision,omitempty"`

	// Current state of PostgreSQL instances.
	// +listType=map
	// +listMapKey=name
	// +optional
	InstanceSets []PostgresInstanceSetStatus `json:"instances,omitempty"`

	// +optional
	Patroni PatroniStatus `json:"patroni,omitempty"`

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

	// Stores the current PostgreSQL major version following a successful
	// major PostgreSQL upgrade.
	// +optional
	PostgresVersion int `json:"postgresVersion"`

	// Current state of the PostgreSQL proxy.
	// +optional
	Proxy PostgresProxyStatus `json:"proxy,omitempty"`

	// The instance that should be started first when bootstrapping and/or starting a
	// PostgresCluster.
	// +optional
	StartupInstance string `json:"startupInstance,omitempty"`

	// The instance set associated with the startupInstance
	// +optional
	StartupInstanceSet string `json:"startupInstanceSet,omitempty"`

	// Current state of the PostgreSQL user interface.
	// +optional
	UserInterface *PostgresUserInterfaceStatus `json:"userInterface,omitempty"`

	// Identifies the users that have been installed into PostgreSQL.
	UsersRevision string `json:"usersRevision,omitempty"`

	// Current state of PostgreSQL cluster monitoring tool configuration
	// +optional
	Monitoring MonitoringStatus `json:"monitoring,omitempty"`

	// DatabaseInitSQL state of custom database initialization in the cluster
	// +optional
	DatabaseInitSQL *string `json:"databaseInitSQL,omitempty"`

	// observedGeneration represents the .metadata.generation on which the status was based.
	// +optional
	// +kubebuilder:validation:Minimum=0
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// conditions represent the observations of postgrescluster's current state.
	// Known .status.conditions.type are: "PersistentVolumeResizing",
	// "Progressing", "ProxyAvailable"
	// +optional
	// +listType=map
	// +listMapKey=type
	// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

PostgresClusterStatus defines the observed state of PostgresCluster

func (*PostgresClusterStatus) DeepCopy

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

func (*PostgresClusterStatus) DeepCopyInto

func (in *PostgresClusterStatus) DeepCopyInto(out *PostgresClusterStatus)

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

type PostgresIdentifier

type PostgresIdentifier string

PostgreSQL identifiers are limited in length but may contain any character. More info: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

+kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=63

type PostgresInstanceSetSpec

type PostgresInstanceSetSpec struct {
	// +optional
	Metadata *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
	Containers []corev1.Container `json:"containers,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"`

	// 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"`

	// Configuration for instance sidecar containers
	// +optional
	Sidecars *InstanceSidecars `json:"sidecars,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"`
}

func (*PostgresInstanceSetSpec) DeepCopy

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

func (*PostgresInstanceSetSpec) DeepCopyInto

func (in *PostgresInstanceSetSpec) DeepCopyInto(out *PostgresInstanceSetSpec)

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

func (*PostgresInstanceSetSpec) Default

func (s *PostgresInstanceSetSpec) Default(i int)

Default sets the default values for an instance set spec, including the name suffix and number of replicas.

type PostgresInstanceSetStatus

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

	// Total number of ready pods.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// Total number of pods.
	// +optional
	Replicas int32 `json:"replicas,omitempty"`

	// Total number of pods that have the desired specification.
	// +optional
	UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
}

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 PostgresPasswordSpec

type PostgresPasswordSpec struct {
	// Type of password to generate. Defaults to ASCII. Valid options are ASCII
	// and AlphaNumeric.
	// "ASCII" passwords contain letters, numbers, and symbols from the US-ASCII character set.
	// "AlphaNumeric" passwords contain letters and numbers from the US-ASCII character set.
	// +kubebuilder:default=ASCII
	// +kubebuilder:validation:Enum={ASCII,AlphaNumeric}
	Type string `json:"type"`
}

func (*PostgresPasswordSpec) DeepCopy

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

func (*PostgresPasswordSpec) DeepCopyInto

func (in *PostgresPasswordSpec) DeepCopyInto(out *PostgresPasswordSpec)

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

type PostgresProxySpec

type PostgresProxySpec struct {

	// Defines a PgBouncer proxy and connection pooler.
	PGBouncer *PGBouncerPodSpec `json:"pgBouncer"`
}

PostgresProxySpec is a union of the supported PostgreSQL proxies.

func (*PostgresProxySpec) DeepCopy

func (in *PostgresProxySpec) DeepCopy() *PostgresProxySpec

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

func (*PostgresProxySpec) DeepCopyInto

func (in *PostgresProxySpec) DeepCopyInto(out *PostgresProxySpec)

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

func (*PostgresProxySpec) Default

func (s *PostgresProxySpec) Default()

Default sets the defaults for any proxies that are set.

type PostgresProxyStatus

type PostgresProxyStatus struct {
	PGBouncer PGBouncerPodStatus `json:"pgBouncer,omitempty"`
}

func (*PostgresProxyStatus) DeepCopy

func (in *PostgresProxyStatus) DeepCopy() *PostgresProxyStatus

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

func (*PostgresProxyStatus) DeepCopyInto

func (in *PostgresProxyStatus) DeepCopyInto(out *PostgresProxyStatus)

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

type PostgresStandbySpec

type PostgresStandbySpec struct {
	// Whether or not the PostgreSQL cluster should be read-only. When this is
	// true, WAL files are applied from a pgBackRest repository or another
	// PostgreSQL server.
	// +optional
	// +kubebuilder:default=true
	Enabled bool `json:"enabled"`

	// The name of the pgBackRest repository to follow for WAL files.
	// +optional
	// +kubebuilder:validation:Pattern=^repo[1-4]
	RepoName string `json:"repoName,omitempty"`

	// Network address of the PostgreSQL server to follow via streaming replication.
	// +optional
	Host string `json:"host,omitempty"`

	// Network port of the PostgreSQL server to follow via streaming replication.
	// +optional
	// +kubebuilder:validation:Minimum=1024
	Port *int32 `json:"port,omitempty"`
}

PostgresStandbySpec defines if/how the cluster should be a hot standby.

func (*PostgresStandbySpec) DeepCopy

func (in *PostgresStandbySpec) DeepCopy() *PostgresStandbySpec

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

func (*PostgresStandbySpec) DeepCopyInto

func (in *PostgresStandbySpec) DeepCopyInto(out *PostgresStandbySpec)

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

type PostgresUserInterfaceStatus

type PostgresUserInterfaceStatus struct {

	// The state of the pgAdmin user interface.
	PGAdmin PGAdminPodStatus `json:"pgAdmin,omitempty"`
}

PostgresUserInterfaceStatus is a union of the supported PostgreSQL user interface statuses.

func (*PostgresUserInterfaceStatus) DeepCopy

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

func (*PostgresUserInterfaceStatus) DeepCopyInto

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

type PostgresUserSpec

type PostgresUserSpec struct {

	// The name of this PostgreSQL user. The value may contain only lowercase
	// letters, numbers, and hyphen so that it fits into Kubernetes metadata.
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	// +kubebuilder:validation:Type=string
	Name PostgresIdentifier `json:"name"`

	// Databases to which this user can connect and create objects. Removing a
	// database from this list does NOT revoke access. This field is ignored for
	// the "postgres" user.
	// +listType=set
	// +optional
	Databases []PostgresIdentifier `json:"databases,omitempty"`

	// ALTER ROLE options except for PASSWORD. This field is ignored for the
	// "postgres" user.
	// More info: https://www.postgresql.org/docs/current/role-attributes.html
	// +kubebuilder:validation:Pattern=`^[^;]*$`
	// +optional
	Options string `json:"options,omitempty"`

	// Properties of the password generated for this user.
	// +optional
	Password *PostgresPasswordSpec `json:"password,omitempty"`
}

func (*PostgresUserSpec) DeepCopy

func (in *PostgresUserSpec) DeepCopy() *PostgresUserSpec

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

func (*PostgresUserSpec) DeepCopyInto

func (in *PostgresUserSpec) DeepCopyInto(out *PostgresUserSpec)

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

type RepoAzure

type RepoAzure struct {

	// The Azure container utilized for the repository
	// +kubebuilder:validation:Required
	Container string `json:"container"`
}

RepoAzure represents a pgBackRest repository that is created using Azure storage

func (*RepoAzure) DeepCopy

func (in *RepoAzure) DeepCopy() *RepoAzure

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

func (*RepoAzure) DeepCopyInto

func (in *RepoAzure) DeepCopyInto(out *RepoAzure)

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

type RepoGCS

type RepoGCS struct {

	// The GCS bucket utilized for the repository
	// +kubebuilder:validation:Required
	Bucket string `json:"bucket"`
}

RepoGCS represents a pgBackRest repository that is created using Google Cloud Storage

func (*RepoGCS) DeepCopy

func (in *RepoGCS) DeepCopy() *RepoGCS

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

func (*RepoGCS) DeepCopyInto

func (in *RepoGCS) DeepCopyInto(out *RepoGCS)

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

type RepoHostStatus

type RepoHostStatus struct {
	metav1.TypeMeta `json:",inline"`

	// Whether or not the pgBackRest repository host is ready for use
	// +optional
	Ready bool `json:"ready"`
}

RepoHostStatus defines the status of a pgBackRest repository host

func (*RepoHostStatus) DeepCopy

func (in *RepoHostStatus) DeepCopy() *RepoHostStatus

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

func (*RepoHostStatus) DeepCopyInto

func (in *RepoHostStatus) DeepCopyInto(out *RepoHostStatus)

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

type RepoPVC

type RepoPVC struct {

	// Defines a PersistentVolumeClaim spec used to create and/or bind a volume
	// +kubebuilder:validation:Required
	VolumeClaimSpec corev1.PersistentVolumeClaimSpec `json:"volumeClaimSpec"`
}

RepoPVC represents a pgBackRest repository that is created using a PersistentVolumeClaim

func (*RepoPVC) DeepCopy

func (in *RepoPVC) DeepCopy() *RepoPVC

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

func (*RepoPVC) DeepCopyInto

func (in *RepoPVC) DeepCopyInto(out *RepoPVC)

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

type RepoS3

type RepoS3 struct {

	// The S3 bucket utilized for the repository
	// +kubebuilder:validation:Required
	Bucket string `json:"bucket"`

	// A valid endpoint corresponding to the specified region
	// +kubebuilder:validation:Required
	Endpoint string `json:"endpoint"`

	// The region corresponding to the S3 bucket
	// +kubebuilder:validation:Required
	Region string `json:"region"`
}

RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storage

func (*RepoS3) DeepCopy

func (in *RepoS3) DeepCopy() *RepoS3

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

func (*RepoS3) DeepCopyInto

func (in *RepoS3) DeepCopyInto(out *RepoS3)

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

type RepoStatus

type RepoStatus struct {

	// The name of the pgBackRest repository
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// Whether or not the pgBackRest repository PersistentVolumeClaim is bound to a volume
	// +optional
	Bound bool `json:"bound,omitempty"`

	// The name of the volume the containing the pgBackRest repository
	// +optional
	VolumeName string `json:"volume,omitempty"`

	// Specifies whether or not a stanza has been successfully created for the repository
	// +optional
	StanzaCreated bool `json:"stanzaCreated"`

	// ReplicaCreateBackupReady indicates whether a backup exists in the repository as needed
	// to bootstrap replicas.
	ReplicaCreateBackupComplete bool `json:"replicaCreateBackupComplete,omitempty"`

	// A hash of the required fields in the spec for defining an Azure, GCS or S3 repository,
	// Utilizd to detect changes to these fields and then execute pgBackRest stanza-create
	// commands accordingly.
	// +optional
	RepoOptionsHash string `json:"repoOptionsHash,omitempty"`
}

RepoStatus the status of a pgBackRest repository

func (*RepoStatus) DeepCopy

func (in *RepoStatus) DeepCopy() *RepoStatus

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

func (*RepoStatus) DeepCopyInto

func (in *RepoStatus) DeepCopyInto(out *RepoStatus)

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

type SchemalessObject

type SchemalessObject map[string]interface{}

SchemalessObject is a map compatible with JSON object.

Use with the following markers: - kubebuilder:pruning:PreserveUnknownFields - kubebuilder:validation:Schemaless - kubebuilder:validation:Type=object

func (*SchemalessObject) DeepCopy

func (in *SchemalessObject) DeepCopy() *SchemalessObject

DeepCopy creates a new SchemalessObject by copying the receiver.

func (SchemalessObject) DeepCopyInto

func (in SchemalessObject) DeepCopyInto(out *SchemalessObject)

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

type ServiceSpec

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

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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

type Sidecar

type Sidecar struct {
	// Resource requirements for a sidecar container
	// +optional
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}

Sidecar defines the configuration of a sidecar container

func (*Sidecar) DeepCopy

func (in *Sidecar) DeepCopy() *Sidecar

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

func (*Sidecar) DeepCopyInto

func (in *Sidecar) DeepCopyInto(out *Sidecar)

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

type UserInterfaceSpec

type UserInterfaceSpec struct {

	// Defines a pgAdmin user interface.
	PGAdmin *PGAdminPodSpec `json:"pgAdmin"`
}

UserInterfaceSpec is a union of the supported PostgreSQL user interfaces.

func (*UserInterfaceSpec) DeepCopy

func (in *UserInterfaceSpec) DeepCopy() *UserInterfaceSpec

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

func (*UserInterfaceSpec) DeepCopyInto

func (in *UserInterfaceSpec) DeepCopyInto(out *UserInterfaceSpec)

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

func (*UserInterfaceSpec) Default

func (s *UserInterfaceSpec) Default()

Default sets the defaults for any user interfaces that are set.

Jump to

Keyboard shortcuts

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