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
- Variables
- type APIResponses
- type AdditionalVolume
- type AutoGrowSpec
- type BackupJobs
- type Backups
- type ClusterUpgrade
- type ConfigDataKey
- type ConfigMapKeyRef
- type CrunchyBridgeCluster
- type CrunchyBridgeClusterList
- type CrunchyBridgeClusterRoleSpec
- type CrunchyBridgeClusterSpec
- type CrunchyBridgeClusterStatus
- type DNS1123Label
- type DNS1123Subdomain
- type DataSource
- type DataSourceVolume
- type DataSourceVolumes
- type DatabaseInitSQL
- type Duration
- type ExporterSpec
- type InstanceSidecars
- type InstrumentationConfigSpec
- type InstrumentationCustomQueries
- type InstrumentationCustomQueriesSpec
- type InstrumentationLogsSpec
- type InstrumentationMetricsSpec
- type InstrumentationSpec
- type LoggingConfiguration
- type Metadata
- type MonitoringSpec
- type MonitoringStatus
- type OpenTelemetryLogsBatchSpec
- type OpenTelemetryResourceDetector
- type OptionalConfigMapKeyRef
- type OptionalSecretKeyRef
- type PGAdmin
- type PGAdminConfiguration
- type PGAdminList
- type PGAdminOAuthConfig
- type PGAdminPodSpec
- type PGAdminPodStatus
- type PGAdminSpec
- type PGAdminStatus
- type PGAdminUser
- type PGAdminVolumesSpec
- type PGBackRestArchive
- type PGBackRestBackupSchedules
- type PGBackRestDataSource
- type PGBackRestJobStatus
- type PGBackRestManualBackup
- type PGBackRestRepo
- type PGBackRestRepoHost
- type PGBackRestRestore
- type PGBackRestScheduledBackupStatus
- type PGBackRestSidecars
- type PGBackRestStatus
- type PGBackRestVolumesSpec
- type PGBouncerConfiguration
- type PGBouncerPodSpec
- type PGBouncerPodStatus
- type PGBouncerSidecars
- type PGBouncerVolumesSpec
- type PGMonitorSpec
- type PGUpgrade
- type PGUpgradeList
- type PGUpgradeSettings
- type PGUpgradeSpec
- type PGUpgradeStatus
- type PatroniLogConfig
- type PatroniSpec
- type PatroniStatus
- type PatroniSwitchover
- type PostgresAuthenticationSpec
- type PostgresCluster
- type PostgresClusterDataSource
- type PostgresClusterList
- type PostgresClusterSpec
- type PostgresClusterStatus
- type PostgresConfigSpec
- type PostgresHBARule
- type PostgresHBARuleSpec
- type PostgresIdentifier
- type PostgresInstanceSetSpec
- type PostgresInstanceSetStatus
- type PostgresPasswordSpec
- type PostgresProxySpec
- type PostgresProxyStatus
- type PostgresStandbySpec
- type PostgresUserInterfaceStatus
- type PostgresUserSpec
- type PostgresVolumesSpec
- type RegistrationRequirementStatus
- type RepoAzure
- type RepoGCS
- type RepoHostStatus
- type RepoPVC
- type RepoS3
- type RepoStatus
- type SchemalessObject
- type SecretKeyRef
- type ServerGroup
- type ServiceSpec
- type Sidecar
- type StandalonePGAdminConfiguration
- type TablespaceVolume
- type UpgradeOperation
- type UserInterfaceSpec
- type VolumeClaimSpec
- type VolumeClaimSpecWithAutoGrow
- type VolumeSnapshots
Constants ¶
const ( ConditionUnknown = "" ConditionUpgrading = "Upgrading" ConditionReady = "Ready" ConditionDeleting = "Deleting" )
TODO(crunchybridgecluster) Think through conditions CrunchyBridgeClusterStatus condition types.
const ( PatroniSwitchoverTypeFailover = "Failover" PatroniSwitchoverTypeSwitchover = "Switchover" )
PatroniSwitchover types.
const ( PostgresPasswordTypeAlphaNumeric = "AlphaNumeric" PostgresPasswordTypeASCII = "ASCII" )
PostgresPasswordSpec types.
const ( PersistentVolumeResizing = "PersistentVolumeResizing" PersistentVolumeResizeError = "PersistentVolumeResizeError" PostgresClusterProgressing = "Progressing" ProxyAvailable = "ProxyAvailable" Registered = "Registered" )
PostgresClusterStatus condition types.
Variables ¶
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 APIResponses ¶
type APIResponses struct { Cluster SchemalessObject `json:"cluster,omitempty"` Status SchemalessObject `json:"status,omitempty"` Upgrade SchemalessObject `json:"upgrade,omitempty"` }
func (*APIResponses) DeepCopy ¶
func (in *APIResponses) DeepCopy() *APIResponses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResponses.
func (*APIResponses) DeepCopyInto ¶
func (in *APIResponses) DeepCopyInto(out *APIResponses)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdditionalVolume ¶
type AdditionalVolume struct { // Name of an existing PersistentVolumeClaim. // --- // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidatePersistentVolumeClaim // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidatePersistentVolumeName // // +optional ClaimName DNS1123Subdomain `json:"claimName,omitempty"` // The names of containers in which to mount this volume. // The default mounts the volume in *all* containers. An empty list does not mount the volume to any containers. // --- // These are matched against [corev1.Container.Name] in a PodSpec, which is a [DNS1123Label]. // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidatePodSpec // // Container names are unique within a Pod, so this list can be, too. // +listType=set // // +kubebuilder:validation:MaxItems=10 // +optional Containers []DNS1123Label `json:"containers"` // Details for adding an image volume // --- // https://docs.k8s.io/concepts/storage/volumes#image // // +optional Image *corev1.ImageVolumeSource `json:"image,omitempty"` // The name of the directory in which to mount this volume. // Volumes are mounted in containers at `/volumes/{name}`. // --- // This also goes into the [corev1.Volume.Name] field, which is a [DNS1123Label]. // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidatePodSpec // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidateVolumes // // We prepend "volumes-" to avoid collisions with other [corev1.PodSpec.Volumes], // so the maximum is 8 less than the inherited 63. // +kubebuilder:validation:MaxLength=55 // // +required Name DNS1123Label `json:"name"` // When true, mount the volume read-only, otherwise read-write. Defaults to false. // --- // [corev1.VolumeMount.ReadOnly] // // +optional ReadOnly bool `json:"readOnly,omitempty"` }
--- Only one applier should be managing each volume definition. https://docs.k8s.io/reference/using-api/server-side-apply#merge-strategy +structType=atomic
+kubebuilder:validation:XValidation:rule=`has(self.claimName) != has(self.image)`,message=`you must set only one of image or claimName` +kubebuilder:validation:XValidation:rule=`!has(self.image) || !has(self.readOnly) || self.readOnly`,message=`readOnly cannot be set false when using an ImageVolumeSource` +kubebuilder:validation:XValidation:rule=`!has(self.image) || (self.?image.reference.hasValue() && self.image.reference.size() > 0)`,message=`if using an ImageVolumeSource, you must set a reference`
func (*AdditionalVolume) AsVolume ¶
func (in *AdditionalVolume) AsVolume(name string) corev1.Volume
AsVolume returns a copy of this as a corev1.Volume.
func (*AdditionalVolume) DeepCopy ¶
func (in *AdditionalVolume) DeepCopy() *AdditionalVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolume.
func (*AdditionalVolume) DeepCopyInto ¶
func (in *AdditionalVolume) DeepCopyInto(out *AdditionalVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutoGrowSpec ¶
type AutoGrowSpec struct { // Trigger is the percentage of used space at which to trigger a volume // expansion. // +optional // +kubebuilder:default=75 // +kubebuilder:validation:Minimum=50 // +kubebuilder:validation:Maximum=90 Trigger *int32 `json:"trigger,omitempty"` // MaxGrow is the maximum size to which the volume can be automatically // expanded. If not set, the volume will grow by 50% of the original size each // time the Trigger threshold is exceeded. // +optional MaxGrow *resource.Quantity `json:"maxGrow,omitempty"` }
AutoGrowSpec provides options to tune volume auto-growing behavior. Auto grow requires that a limit be set on the PVC.
func (*AutoGrowSpec) DeepCopy ¶
func (in *AutoGrowSpec) DeepCopy() *AutoGrowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoGrowSpec.
func (*AutoGrowSpec) DeepCopyInto ¶
func (spec *AutoGrowSpec) DeepCopyInto(out *AutoGrowSpec)
DeepCopyInto copies the receiver into out. Both must be non-nil.
func (*AutoGrowSpec) Default ¶
func (spec *AutoGrowSpec) Default()
type BackupJobs ¶
type BackupJobs struct { // Resource limits for backup jobs. Includes manual, scheduled and replica // create backups // +optional Resources corev1.ResourceRequirements `json:"resources,omitzero"` // Logging configuration for pgbackrest processes running in Backup Job Pods. // +optional Log *LoggingConfiguration `json:"log,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"` // Limit the lifetime of a Job that has finished. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/job // +optional // +kubebuilder:validation:Minimum=60 TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` // Volumes to add to Backup Job Pods // +optional Volumes *PGBackRestVolumesSpec `json:"volumes,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 // +optional PGBackRest PGBackRestArchive `json:"pgbackrest"` // VolumeSnapshot configuration // +optional Snapshots *VolumeSnapshots `json:"snapshots,omitempty"` }
Backups defines a PostgreSQL archive configuration
func (*Backups) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backups.
func (*Backups) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterUpgrade ¶
type ClusterUpgrade struct {
Operations []*UpgradeOperation `json:"operations,omitempty"`
}
func (*ClusterUpgrade) DeepCopy ¶
func (in *ClusterUpgrade) DeepCopy() *ClusterUpgrade
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterUpgrade.
func (*ClusterUpgrade) DeepCopyInto ¶
func (in *ClusterUpgrade) DeepCopyInto(out *ClusterUpgrade)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigDataKey ¶
type ConfigDataKey = string
--- https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsConfigMapKey
+kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=253 +kubebuilder:validation:Pattern=`^[-._a-zA-Z0-9]+$` +kubebuilder:validation:XValidation:rule=`self != "." && !self.startsWith("..")`,message=`cannot be "." or start with ".."`
type ConfigMapKeyRef ¶
type ConfigMapKeyRef struct { // Name of the ConfigMap. // --- // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidateConfigMapName // +required Name DNS1123Subdomain `json:"name"` // Name of the data field within the ConfigMap. // --- // https://github.com/kubernetes/kubernetes/blob/v1.32.0/pkg/apis/core/validation/validation.go#L2849 // https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsConfigMapKey // +required Key ConfigDataKey `json:"key"` }
+structType=atomic
func (*ConfigMapKeyRef) AsProjection ¶
func (in *ConfigMapKeyRef) AsProjection(path string) corev1.ConfigMapProjection
AsProjection returns a copy of this as a corev1.ConfigMapProjection.
func (*ConfigMapKeyRef) DeepCopy ¶
func (in *ConfigMapKeyRef) DeepCopy() *ConfigMapKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeyRef.
func (*ConfigMapKeyRef) DeepCopyInto ¶
func (in *ConfigMapKeyRef) DeepCopyInto(out *ConfigMapKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrunchyBridgeCluster ¶
type CrunchyBridgeCluster struct { // In Bridge json, meta.name is "name" metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitzero"` // +optional Spec CrunchyBridgeClusterSpec `json:"spec,omitzero"` // +optional Status CrunchyBridgeClusterStatus `json:"status,omitzero"` }
CrunchyBridgeCluster is the Schema for the crunchybridgeclusters API
func NewCrunchyBridgeCluster ¶
func NewCrunchyBridgeCluster() *CrunchyBridgeCluster
func (*CrunchyBridgeCluster) DeepCopy ¶
func (in *CrunchyBridgeCluster) DeepCopy() *CrunchyBridgeCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrunchyBridgeCluster.
func (*CrunchyBridgeCluster) DeepCopyInto ¶
func (in *CrunchyBridgeCluster) DeepCopyInto(out *CrunchyBridgeCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CrunchyBridgeCluster) DeepCopyObject ¶
func (in *CrunchyBridgeCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CrunchyBridgeCluster) Default ¶
func (c *CrunchyBridgeCluster) 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 CrunchyBridgeClusterList ¶
type CrunchyBridgeClusterList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitzero"` Items []CrunchyBridgeCluster `json:"items"` }
CrunchyBridgeClusterList contains a list of CrunchyBridgeCluster
func (*CrunchyBridgeClusterList) DeepCopy ¶
func (in *CrunchyBridgeClusterList) DeepCopy() *CrunchyBridgeClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrunchyBridgeClusterList.
func (*CrunchyBridgeClusterList) DeepCopyInto ¶
func (in *CrunchyBridgeClusterList) DeepCopyInto(out *CrunchyBridgeClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CrunchyBridgeClusterList) DeepCopyObject ¶
func (in *CrunchyBridgeClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CrunchyBridgeClusterRoleSpec ¶
type CrunchyBridgeClusterRoleSpec struct { // Name of the role within Crunchy Bridge. // More info: https://docs.crunchybridge.com/concepts/users // +kubebuilder:validation:Required Name string `json:"name"` // The name of the Secret that will hold the role credentials. // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$` // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Type=string SecretName string `json:"secretName"` }
func (*CrunchyBridgeClusterRoleSpec) DeepCopy ¶
func (in *CrunchyBridgeClusterRoleSpec) DeepCopy() *CrunchyBridgeClusterRoleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrunchyBridgeClusterRoleSpec.
func (*CrunchyBridgeClusterRoleSpec) DeepCopyInto ¶
func (in *CrunchyBridgeClusterRoleSpec) DeepCopyInto(out *CrunchyBridgeClusterRoleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrunchyBridgeClusterSpec ¶
type CrunchyBridgeClusterSpec struct { // +optional Metadata *Metadata `json:"metadata,omitempty"` // Whether the cluster is high availability, // meaning that it has a secondary it can fail over to quickly // in case the primary becomes unavailable. // +kubebuilder:validation:Required IsHA bool `json:"isHa"` // Whether the cluster is protected. Protected clusters can't be destroyed until // their protected flag is removed // +kubebuilder:validation:Optional IsProtected bool `json:"isProtected,omitempty"` // The name of the cluster // --- // According to Bridge API/GUI errors, // "Field name should be between 5 and 50 characters in length, containing only unicode characters, unicode numbers, hyphens, spaces, or underscores, and starting with a character", and ending with a character or number. // +kubebuilder:validation:MinLength=5 // +kubebuilder:validation:MaxLength=50 // +kubebuilder:validation:Pattern=`^[A-Za-z][A-Za-z0-9\-_ ]*[A-Za-z0-9]$` // +kubebuilder:validation:Required // +kubebuilder:validation:Type=string ClusterName string `json:"clusterName"` // The ID of the cluster's plan. Determines instance, CPU, and memory. // +kubebuilder:validation:Required Plan string `json:"plan"` // The ID of the cluster's major Postgres version. // Currently Bridge offers 13-17 // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=13 // +kubebuilder:validation:Maximum=17 // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1 PostgresVersion int `json:"majorVersion"` // The cloud provider where the cluster is located. // Currently Bridge offers aws, azure, and gcp only // --- // +kubebuilder:validation:Required // +kubebuilder:validation:Enum={aws,azure,gcp} // +kubebuilder:validation:XValidation:rule=`self == oldSelf`,message="immutable" Provider string `json:"provider"` // The provider region where the cluster is located. // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule=`self == oldSelf`,message="immutable" Region string `json:"region"` // Roles for which to create Secrets that contain their credentials which // are retrieved from the Bridge API. An empty list creates no role secrets. // Removing a role from this list does NOT drop the role nor revoke their // access, but it will delete that role's secret from the kube cluster. // +kubebuilder:validation:Optional // +listType=map // +listMapKey=name Roles []*CrunchyBridgeClusterRoleSpec `json:"roles,omitempty"` // The name of the secret containing the API key and team id // +kubebuilder:validation:Required Secret string `json:"secret"` // The amount of storage available to the cluster in gigabytes. // The amount must be an integer, followed by Gi (gibibytes) or G (gigabytes) to match Kubernetes conventions. // If the amount is given in Gi, we round to the nearest G value. // The minimum value allowed by Bridge is 10 GB. // The maximum value allowed by Bridge is 65535 GB. // +kubebuilder:validation:Required Storage resource.Quantity `json:"storage"` }
CrunchyBridgeClusterSpec defines the desired state of CrunchyBridgeCluster to be managed by Crunchy Data Bridge
func (*CrunchyBridgeClusterSpec) DeepCopy ¶
func (in *CrunchyBridgeClusterSpec) DeepCopy() *CrunchyBridgeClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrunchyBridgeClusterSpec.
func (*CrunchyBridgeClusterSpec) DeepCopyInto ¶
func (in *CrunchyBridgeClusterSpec) DeepCopyInto(out *CrunchyBridgeClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrunchyBridgeClusterStatus ¶
type CrunchyBridgeClusterStatus struct { // The name of the cluster in Bridge. // +optional ClusterName string `json:"name,omitempty"` // conditions represent the observations of postgres cluster's current state. // +optional // +listType=map // +listMapKey=type // +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"} Conditions []metav1.Condition `json:"conditions,omitempty"` // The Hostname of the postgres cluster in Bridge, provided by Bridge API and null until then. // +optional Host string `json:"host,omitempty"` // The ID of the postgres cluster in Bridge, provided by Bridge API and null until then. // +optional ID string `json:"id,omitempty"` // Whether the cluster is high availability, meaning that it has a secondary it can fail // over to quickly in case the primary becomes unavailable. // +optional IsHA *bool `json:"isHa"` // Whether the cluster is protected. Protected clusters can't be destroyed until // their protected flag is removed // +optional IsProtected *bool `json:"isProtected"` // The cluster's major Postgres version. // +optional MajorVersion int `json:"majorVersion"` // observedGeneration represents the .metadata.generation on which the status was based. // +optional // +kubebuilder:validation:Minimum=0 ObservedGeneration int64 `json:"observedGeneration,omitempty"` // The cluster upgrade as represented by Bridge // +optional OngoingUpgrade []*UpgradeOperation `json:"ongoingUpgrade,omitempty"` // The ID of the cluster's plan. Determines instance, CPU, and memory. // +optional Plan string `json:"plan"` // Most recent, raw responses from Bridge API // +optional // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=object Responses APIResponses `json:"responses"` // State of cluster in Bridge. // +optional State string `json:"state,omitempty"` // The amount of storage available to the cluster. // +optional Storage *resource.Quantity `json:"storage"` }
CrunchyBridgeClusterStatus defines the observed state of CrunchyBridgeCluster
func (*CrunchyBridgeClusterStatus) DeepCopy ¶
func (in *CrunchyBridgeClusterStatus) DeepCopy() *CrunchyBridgeClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrunchyBridgeClusterStatus.
func (*CrunchyBridgeClusterStatus) DeepCopyInto ¶
func (in *CrunchyBridgeClusterStatus) DeepCopyInto(out *CrunchyBridgeClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNS1123Label ¶
type DNS1123Label = string
--- https://docs.k8s.io/concepts/overview/working-with-objects/names#dns-label-names https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsDNS1123Label https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Format
+kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=63 +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
type DNS1123Subdomain ¶
type DNS1123Subdomain = string
--- https://docs.k8s.io/concepts/overview/working-with-objects/names#dns-subdomain-names https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsDNS1123Subdomain https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Format
+kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=253 +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?([.][a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
type DataSource ¶
type DataSource struct { // Defines a pgBackRest cloud-based 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 // +kubebuilder:validation:XValidation:rule="!has(self.repo.volume)", message="Only S3, GCS or Azure repos can be used as a pgBackRest data source.", fieldPath=".repo" 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 directory 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 Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
--- Duration represents a string accepted by the Kubernetes API in the "duration" format. This format extends the "duration" defined by OpenAPI by allowing some whitespace and more units:
- nanoseconds: ns, nano, nanos
- microseconds: us, µs, micro, micros
- milliseconds: ms, milli, millis
- seconds: s, sec, secs
- minutes: m, min, mins
- hours: h, hr, hour, hours
- days: d, day, days
- weeks: w, wk, week, weeks
An empty amount is represented as "0" with no unit. One day is always 24 hours and one week is always 7 days (168 hours).
+kubebuilder:validation:Format=duration +kubebuilder:validation:MinLength=1 +kubebuilder:validation:Type=string
During CEL validation, a value of this type is a "google.protobuf.Duration". It is safe to pass the value to `duration()` but not necessary.
- https://docs.k8s.io/reference/using-api/cel/#type-system-integration - https://github.com/google/cel-spec/blob/-/doc/langdef.md#types-and-conversions
NOTE: When using this type, reject fractional numbers using a Pattern to avoid an upstream bug: https://github.com/kubernetes/kube-openapi/issues/523
func NewDuration ¶
NewDuration creates a duration from the Kubernetes "duration" format in s.
func (*Duration) AsDuration ¶
AsDuration returns a copy of d as a metav1.Duration.
func (*Duration) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.
func (*Duration) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Duration) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type ExporterSpec ¶
type ExporterSpec struct { // Projected volumes containing custom PostgreSQL Exporter configuration. Currently supports // the customization of PostgreSQL Exporter queries. If a "queries.yml" 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"` // Projected secret containing custom TLS certificates to encrypt output from the exporter // web server // +optional CustomTLSSecret *corev1.SecretProjection `json:"customTLSSecret,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,omitzero"` }
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 InstrumentationConfigSpec ¶
type InstrumentationConfigSpec struct { // Resource detectors add identifying attributes to logs and metrics. These run in the order they are defined. // More info: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/-/processor/resourcedetectionprocessor#readme // --- // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:MinItems=1 // +listMapKey=name // +listType=map // +optional Detectors []OpenTelemetryResourceDetector `json:"detectors,omitempty"` // Exporters allows users to configure OpenTelemetry exporters that exist // in the collector image. // --- // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=object // +optional Exporters SchemalessObject `json:"exporters,omitempty"` // Files allows the user to mount projected volumes into the collector // Pod so that files can be referenced by the collector as needed. // --- // +kubebuilder:validation:MinItems=1 // +listType=atomic // +optional Files []corev1.VolumeProjection `json:"files,omitempty"` // EnvironmentVariables allows the user to add environment variables to the // collector container. // --- // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:items:XValidation:rule=`self.name != 'K8S_POD_NAMESPACE' && self.name != 'K8S_POD_NAME' && self.name != 'PGPASSWORD'`,message="Cannot overwrite environment variables set by operator" // +listType=atomic // +optional EnvironmentVariables []corev1.EnvVar `json:"environmentVariables,omitempty"` }
InstrumentationConfigSpec allows users to configure their own exporters, add files, etc.
func (*InstrumentationConfigSpec) DeepCopy ¶
func (in *InstrumentationConfigSpec) DeepCopy() *InstrumentationConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationConfigSpec.
func (*InstrumentationConfigSpec) DeepCopyInto ¶
func (in *InstrumentationConfigSpec) DeepCopyInto(out *InstrumentationConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstrumentationCustomQueries ¶
type InstrumentationCustomQueries struct { // The name of this batch of queries, which will be used in naming the OTel // SqlQuery receiver. // --- // OTel restricts component names from having whitespace, control characters, // or symbols. // https://github.com/open-telemetry/opentelemetry-collector/blob/main/component/identifiable.go#L23-L26 // +kubebuilder:validation:Pattern=`^[^\pZ\pC\pS]+$` // // Set a max length to keep rule costs low. // +kubebuilder:validation:MaxLength=20 // // +required Name string `json:"name"` // A ConfigMap holding the yaml file that contains the queries. // --- // +required Queries ConfigMapKeyRef `json:"queries"` // How often the queries should be run. // --- // Kubernetes ensures the value is in the "duration" format, but go ahead // and loosely validate the format to show some acceptable units. // NOTE: This rejects fractional numbers: https://github.com/kubernetes/kube-openapi/issues/523 // +kubebuilder:validation:Pattern=`^((PT)?( *[0-9]+ *(?i:(ms|s|m)|(milli|sec|min)s?))+|0)$` // // `controller-gen` needs to know "Type=string" to allow a "Pattern". // +kubebuilder:validation:Type=string // // Set a max length to keep rule costs low. // +kubebuilder:validation:MaxLength=20 // +kubebuilder:validation:XValidation:rule=`duration("0") <= self && self <= duration("60m")` // // +default="5s" // +optional CollectionInterval *Duration `json:"collectionInterval,omitempty"` // The databases to target with added custom queries. // Default behavior is to target `postgres`. // --- // +optional Databases []string `json:"databases,omitempty"` }
func (*InstrumentationCustomQueries) DeepCopy ¶
func (in *InstrumentationCustomQueries) DeepCopy() *InstrumentationCustomQueries
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationCustomQueries.
func (*InstrumentationCustomQueries) DeepCopyInto ¶
func (in *InstrumentationCustomQueries) DeepCopyInto(out *InstrumentationCustomQueries)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstrumentationCustomQueriesSpec ¶
type InstrumentationCustomQueriesSpec struct { // User defined queries and metrics. // --- // +optional Add []InstrumentationCustomQueries `json:"add,omitempty"` // A list of built-in queries that should be removed. If all queries for a // given SQL statement are removed, the SQL statement will no longer be run. // --- // +optional Remove []string `json:"remove,omitempty"` }
func (*InstrumentationCustomQueriesSpec) DeepCopy ¶
func (in *InstrumentationCustomQueriesSpec) DeepCopy() *InstrumentationCustomQueriesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationCustomQueriesSpec.
func (*InstrumentationCustomQueriesSpec) DeepCopyInto ¶
func (in *InstrumentationCustomQueriesSpec) DeepCopyInto(out *InstrumentationCustomQueriesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstrumentationLogsSpec ¶
type InstrumentationLogsSpec struct { // Log records are exported in small batches. Set this field to change their size and frequency. // --- // +optional Batches *OpenTelemetryLogsBatchSpec `json:"batches,omitempty"` // The names of exporters that should send logs. // --- // +kubebuilder:validation:MinItems=1 // +listType=set // +optional Exporters []string `json:"exporters,omitempty"` // How long to retain log files locally. An RFC 3339 duration or a number // and unit: `12 hr`, `3d`, `4 weeks`, etc. // --- // Kubernetes ensures the value is in the "duration" format, but go ahead // and loosely validate the format to show some acceptable units. // NOTE: This rejects fractional numbers: https://github.com/kubernetes/kube-openapi/issues/523 // +kubebuilder:validation:Pattern=`^(PT)?( *[0-9]+ *(?i:(h|hr|d|w|wk)|(hour|day|week)s?))+$` // // `controller-gen` needs to know "Type=string" to allow a "Pattern". // +kubebuilder:validation:Type=string // // Set a max length to keep rule costs low. // +kubebuilder:validation:MaxLength=20 // +kubebuilder:validation:XValidation:rule=`duration("1h") <= self && self <= duration("8760h")`,message="must be at least one hour" // // +optional RetentionPeriod *Duration `json:"retentionPeriod,omitempty"` }
InstrumentationLogsSpec defines the configuration for collecting logs via OpenTelemetry.
func (*InstrumentationLogsSpec) DeepCopy ¶
func (in *InstrumentationLogsSpec) DeepCopy() *InstrumentationLogsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationLogsSpec.
func (*InstrumentationLogsSpec) DeepCopyInto ¶
func (in *InstrumentationLogsSpec) DeepCopyInto(out *InstrumentationLogsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstrumentationMetricsSpec ¶
type InstrumentationMetricsSpec struct { // Where users can turn off built-in metrics and also provide their own // custom queries. // --- // +optional CustomQueries *InstrumentationCustomQueriesSpec `json:"customQueries,omitempty"` // The names of exporters that should send metrics. // --- // +kubebuilder:validation:MinItems=1 // +listType=set // +optional Exporters []string `json:"exporters,omitempty"` // User defined databases to target for default per-db metrics // --- // +optional PerDBMetricTargets []string `json:"perDBMetricTargets,omitempty"` }
func (*InstrumentationMetricsSpec) DeepCopy ¶
func (in *InstrumentationMetricsSpec) DeepCopy() *InstrumentationMetricsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationMetricsSpec.
func (*InstrumentationMetricsSpec) DeepCopyInto ¶
func (in *InstrumentationMetricsSpec) DeepCopyInto(out *InstrumentationMetricsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstrumentationSpec ¶
type InstrumentationSpec struct { // Image name to use for collector containers. When omitted, the value // comes from an operator environment variable. // --- // +optional Image string `json:"image,omitempty"` // Resources holds the resource requirements for the collector container. // --- // +optional Resources corev1.ResourceRequirements `json:"resources,omitzero"` // Config is the place for users to configure exporters and provide files. // --- // +optional Config *InstrumentationConfigSpec `json:"config,omitempty"` // Logs is the place for users to configure the log collection. // --- // +optional Logs *InstrumentationLogsSpec `json:"logs,omitempty"` // Metrics is the place for users to configure metrics collection. // --- // +optional Metrics *InstrumentationMetricsSpec `json:"metrics,omitempty"` }
InstrumentationSpec defines the configuration for collecting logs and metrics via OpenTelemetry.
func (*InstrumentationSpec) DeepCopy ¶
func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec.
func (*InstrumentationSpec) DeepCopyInto ¶
func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LoggingConfiguration ¶
type LoggingConfiguration struct { // +kubebuilder:validation:MaxLength=256 // +optional Path string `json:"path,omitempty"` }
LoggingConfiguration provides logging configuration for various components
func (*LoggingConfiguration) DeepCopy ¶
func (in *LoggingConfiguration) DeepCopy() *LoggingConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingConfiguration.
func (*LoggingConfiguration) DeepCopyInto ¶
func (in *LoggingConfiguration) DeepCopyInto(out *LoggingConfiguration)
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 custom resources
func (*Metadata) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
func (*Metadata) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Metadata) GetAnnotationsOrNil ¶
GetAnnotationsOrNil gets annotations from a Metadata pointer, if Metadata hasn't been set return nil
func (*Metadata) GetLabelsOrNil ¶
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 OpenTelemetryLogsBatchSpec ¶
type OpenTelemetryLogsBatchSpec struct { // Maximum time to wait before exporting a log record. Higher numbers // allow more records to be deduplicated and compressed before export. // --- // Kubernetes ensures the value is in the "duration" format, but go ahead // and loosely validate the format to show some acceptable units. // NOTE: This rejects fractional numbers: https://github.com/kubernetes/kube-openapi/issues/523 // +kubebuilder:validation:Pattern=`^((PT)?( *[0-9]+ *(?i:(ms|s|m)|(milli|sec|min)s?))+|0)$` // // `controller-gen` needs to know "Type=string" to allow a "Pattern". // +kubebuilder:validation:Type=string // // Set a max length to keep rule costs low. // +kubebuilder:validation:MaxLength=20 // +kubebuilder:validation:XValidation:rule=`duration("0") <= self && self <= duration("5m")` // // +default="200ms" // +optional MaxDelay *Duration `json:"maxDelay,omitempty"` // Maximum number of records to include in an exported batch. When present, // batches this size are sent without any further delay. // --- // +kubebuilder:validation:Minimum=1 // +optional MaxRecords *int32 `json:"maxRecords,omitempty"` // Number of records to wait for before exporting a batch. Higher numbers // allow more records to be deduplicated and compressed before export. // --- // +kubebuilder:validation:Minimum=0 // +default=8192 // +optional MinRecords *int32 `json:"minRecords,omitempty"` }
--- Configuration for the OpenTelemetry Batch Processor https://pkg.go.dev/go.opentelemetry.io/collector/processor/batchprocessor#section-readme --- The batch processor stops batching when *either* of these is zero, but that is confusing. Make the user set both so it is evident there is *no* motivation to create any batch. +kubebuilder:validation:XValidation:rule=`(has(self.minRecords) && self.minRecords == 0) == (has(self.maxDelay) && self.maxDelay == duration('0'))`,message=`to disable batching, both minRecords and maxDelay must be zero`
+kubebuilder:validation:XValidation:rule=`!has(self.maxRecords) || self.minRecords <= self.maxRecords`,message=`minRecords cannot be larger than maxRecords` +structType=atomic
func (*OpenTelemetryLogsBatchSpec) DeepCopy ¶
func (in *OpenTelemetryLogsBatchSpec) DeepCopy() *OpenTelemetryLogsBatchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryLogsBatchSpec.
func (*OpenTelemetryLogsBatchSpec) DeepCopyInto ¶
func (in *OpenTelemetryLogsBatchSpec) DeepCopyInto(out *OpenTelemetryLogsBatchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenTelemetryLogsBatchSpec) Default ¶
func (s *OpenTelemetryLogsBatchSpec) Default()
type OpenTelemetryResourceDetector ¶
type OpenTelemetryResourceDetector struct { // Name of the resource detector to enable: `aks`, `eks`, `gcp`, etc. // --- // +kubebuilder:validation:MaxLength=20 // +kubebuilder:validation:MinLength=1 // +required Name string `json:"name"` // Attributes to use from this detector. Detectors usually add every attribute // they know automatically. Names omitted here behave according to detector defaults. // --- // +kubebuilder:validation:MaxProperties=30 // +kubebuilder:validation:MinProperties=1 // +mapType=atomic // +optional Attributes map[string]bool `json:"attributes,omitempty"` }
--- +structType=atomic
func (*OpenTelemetryResourceDetector) DeepCopy ¶
func (in *OpenTelemetryResourceDetector) DeepCopy() *OpenTelemetryResourceDetector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryResourceDetector.
func (*OpenTelemetryResourceDetector) DeepCopyInto ¶
func (in *OpenTelemetryResourceDetector) DeepCopyInto(out *OpenTelemetryResourceDetector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OptionalConfigMapKeyRef ¶
type OptionalConfigMapKeyRef struct { ConfigMapKeyRef `json:",inline"` // Whether or not the ConfigMap or its data must be defined. Defaults to false. // +optional Optional *bool `json:"optional,omitempty"` }
+structType=atomic
func (*OptionalConfigMapKeyRef) AsProjection ¶
func (in *OptionalConfigMapKeyRef) AsProjection(path string) corev1.ConfigMapProjection
AsProjection returns a copy of this as a corev1.ConfigMapProjection.
func (*OptionalConfigMapKeyRef) DeepCopy ¶
func (in *OptionalConfigMapKeyRef) DeepCopy() *OptionalConfigMapKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalConfigMapKeyRef.
func (*OptionalConfigMapKeyRef) DeepCopyInto ¶
func (in *OptionalConfigMapKeyRef) DeepCopyInto(out *OptionalConfigMapKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OptionalSecretKeyRef ¶
type OptionalSecretKeyRef struct { SecretKeyRef `json:",inline"` // Whether or not the Secret or its data must be defined. Defaults to false. // +optional Optional *bool `json:"optional,omitempty"` }
+structType=atomic
func (*OptionalSecretKeyRef) AsProjection ¶
func (in *OptionalSecretKeyRef) AsProjection(path string) corev1.SecretProjection
AsProjection returns a copy of this as a corev1.SecretProjection.
func (*OptionalSecretKeyRef) DeepCopy ¶
func (in *OptionalSecretKeyRef) DeepCopy() *OptionalSecretKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalSecretKeyRef.
func (*OptionalSecretKeyRef) DeepCopyInto ¶
func (in *OptionalSecretKeyRef) DeepCopyInto(out *OptionalSecretKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PGAdmin ¶
type PGAdmin struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitzero"` // +optional Spec PGAdminSpec `json:"spec,omitzero"` // +optional Status PGAdminStatus `json:"status,omitzero"` }
PGAdmin is the Schema for the PGAdmin API
func NewPGAdmin ¶
func NewPGAdmin() *PGAdmin
func (*PGAdmin) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdmin.
func (*PGAdmin) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PGAdmin) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PGAdmin) Default ¶
func (p *PGAdmin) 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 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 *OptionalSecretKeyRef `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 ¶
func (in *PGAdminConfiguration) DeepCopy() *PGAdminConfiguration
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 PGAdminList ¶
type PGAdminList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitzero"` Items []PGAdmin `json:"items"` }
PGAdminList contains a list of PGAdmin
func (*PGAdminList) DeepCopy ¶
func (in *PGAdminList) DeepCopy() *PGAdminList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdminList.
func (*PGAdminList) DeepCopyInto ¶
func (in *PGAdminList) DeepCopyInto(out *PGAdminList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PGAdminList) DeepCopyObject ¶
func (in *PGAdminList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PGAdminOAuthConfig ¶
type PGAdminOAuthConfig struct { // The OAUTH2_NAME of this configuration. // --- // This goes into a filename, so let's keep it short and simple. // The Secret is allowed to contain OAUTH2_NAME and deviate from this. // +kubebuilder:validation:Pattern=`^[A-Za-z0-9]+$` // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=20 // +required Name string `json:"name"` // A Secret containing the settings of one OAuth2 provider as a JSON object. // --- // +required Secret SecretKeyRef `json:"secret"` }
+structType=atomic
func (*PGAdminOAuthConfig) DeepCopy ¶
func (in *PGAdminOAuthConfig) DeepCopy() *PGAdminOAuthConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdminOAuthConfig.
func (*PGAdminOAuthConfig) DeepCopyInto ¶
func (in *PGAdminOAuthConfig) DeepCopyInto(out *PGAdminOAuthConfig)
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,omitzero"` // Defines a PersistentVolumeClaim for pgAdmin data. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes // --- // +required DataVolumeClaimSpec VolumeClaimSpec `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,omitzero"` // 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 PGAdminSpec ¶
type PGAdminSpec struct { // +optional Metadata *Metadata `json:"metadata,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 StandalonePGAdminConfiguration `json:"config,omitzero"` // Defines a PersistentVolumeClaim for pgAdmin data. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes // --- // +required DataVolumeClaimSpec VolumeClaimSpec `json:"dataVolumeClaimSpec"` // The image name to use for pgAdmin instance. // +optional 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 PGAdmin pods to restart. // https://k8s.io/docs/tasks/configure-pod-container/pull-image-private-registry/ // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Configuration for the OpenTelemetry collector container used to collect // logs and metrics. // +optional Instrumentation *InstrumentationSpec `json:"instrumentation,omitempty"` // Resource requirements for the PGAdmin container. // +optional Resources corev1.ResourceRequirements `json:"resources,omitzero"` // Scheduling constraints of the PGAdmin 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 PGAdmin pod. Changing this // value causes PGAdmin pod to restart. // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ // +optional PriorityClassName *string `json:"priorityClassName,omitempty"` // Tolerations of the PGAdmin pod. // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // ServerGroups for importing PostgresClusters to pgAdmin. // To create a pgAdmin with no selectors, leave this field empty. // A pgAdmin created with no `ServerGroups` will not automatically // add any servers through discovery. PostgresClusters can still be // added manually. // +optional ServerGroups []ServerGroup `json:"serverGroups"` // pgAdmin users that are managed via the PGAdmin spec. Users can still // be added via the pgAdmin GUI, but those users will not show up here. // +listType=map // +listMapKey=username // +optional Users []PGAdminUser `json:"users,omitempty"` // ServiceName will be used as the name of a ClusterIP service pointing // to the pgAdmin pod and port. If the service already exists, PGO will // update the service. For more information about services reference // the Kubernetes and CrunchyData documentation. // https://kubernetes.io/docs/concepts/services-networking/service/ // +optional ServiceName string `json:"serviceName,omitempty"` Volumes *PGAdminVolumesSpec `json:"volumes,omitempty"` }
PGAdminSpec defines the desired state of PGAdmin
func (*PGAdminSpec) DeepCopy ¶
func (in *PGAdminSpec) DeepCopy() *PGAdminSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdminSpec.
func (*PGAdminSpec) DeepCopyInto ¶
func (in *PGAdminSpec) DeepCopyInto(out *PGAdminSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PGAdminStatus ¶
type PGAdminStatus struct { // conditions represent the observations of pgAdmin's current state. // Known .status.conditions.type is: "PersistentVolumeResizing" // +optional // +listType=map // +listMapKey=type // +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"} Conditions []metav1.Condition `json:"conditions,omitempty"` // ImageSHA represents the image SHA for the container running pgAdmin. // +optional ImageSHA string `json:"imageSHA,omitempty"` // MajorVersion represents the major version of the running pgAdmin. // +optional MajorVersion int `json:"majorVersion,omitempty"` // observedGeneration represents the .metadata.generation on which the status was based. // +optional // +kubebuilder:validation:Minimum=0 ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
PGAdminStatus defines the observed state of PGAdmin
func (*PGAdminStatus) DeepCopy ¶
func (in *PGAdminStatus) DeepCopy() *PGAdminStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdminStatus.
func (*PGAdminStatus) DeepCopyInto ¶
func (in *PGAdminStatus) DeepCopyInto(out *PGAdminStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PGAdminUser ¶
type PGAdminUser struct { // A reference to the secret that holds the user's password. // +kubebuilder:validation:Required PasswordRef *corev1.SecretKeySelector `json:"passwordRef"` // Role determines whether the user has admin privileges or not. // Defaults to User. Valid options are Administrator and User. // --- // +kubebuilder:validation:Enum={Administrator,User} // +optional Role string `json:"role,omitempty"` // The username for User in pgAdmin. // Must be unique in the pgAdmin's users list. // +kubebuilder:validation:Required Username string `json:"username"` }
func (*PGAdminUser) DeepCopy ¶
func (in *PGAdminUser) DeepCopy() *PGAdminUser
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdminUser.
func (*PGAdminUser) DeepCopyInto ¶
func (in *PGAdminUser) DeepCopyInto(out *PGAdminUser)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PGAdminVolumesSpec ¶
type PGAdminVolumesSpec struct { // Additional pre-existing volumes to add to the pod. // --- // +optional // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=10 Additional []AdditionalVolume `json:"additional,omitempty"` }
PGAdminVolumesSpec defines the configuration for pgAdmin additional volumes
func (*PGAdminVolumesSpec) DeepCopy ¶
func (in *PGAdminVolumesSpec) DeepCopy() *PGAdminVolumesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGAdminVolumesSpec.
func (*PGAdminVolumesSpec) DeepCopyInto ¶
func (in *PGAdminVolumesSpec) DeepCopyInto(out *PGAdminVolumesSpec)
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"` // Logging configuration for pgbackrest processes running in postgres instance pods. // +optional Log *LoggingConfiguration `json:"log,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 ¶
func (in *PGBackRestBackupSchedules) DeepCopy() *PGBackRestBackupSchedules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBackRestBackupSchedules.
func (*PGBackRestBackupSchedules) DeepCopyInto ¶
func (in *PGBackRestBackupSchedules) DeepCopyInto(out *PGBackRestBackupSchedules)
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,omitzero"` // 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"` // Volumes to add to Restore Job Pods // +optional Volumes *PGBackRestVolumesSpec `json:"volumes,omitempty"` }
PGBackRestDataSource defines a pgBackRest configuration specifically for restoring from cloud-based data source
func (*PGBackRestDataSource) DeepCopy ¶
func (in *PGBackRestDataSource) DeepCopy() *PGBackRestDataSource
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 ¶
func (in *PGBackRestManualBackup) DeepCopy() *PGBackRestManualBackup
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 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"` // Logging configuration for pgbackrest processes running in the repo host pod. // +optional Log *LoggingConfiguration `json:"log,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,omitzero"` // 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"` // Volumes to add to the Repo Host Pod // +optional Volumes *PGBackRestVolumesSpec `json:"volumes,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:Optional CronJobName string `json:"cronJobName,omitempty"` // The name of the associated pgBackRest repository // +kubebuilder:validation:Optional RepoName string `json:"repo,omitempty"` // The pgBackRest backup type for this Job // +kubebuilder:validation:Optional 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 ¶
func (in *PGBackRestScheduledBackupStatus) DeepCopy() *PGBackRestScheduledBackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBackRestScheduledBackupStatus.
func (*PGBackRestScheduledBackupStatus) DeepCopyInto ¶
func (in *PGBackRestScheduledBackupStatus) DeepCopyInto(out *PGBackRestScheduledBackupStatus)
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 PGBackRestVolumesSpec ¶
type PGBackRestVolumesSpec struct { // Additional pre-existing volumes to add to the pod. // --- // +optional // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=10 Additional []AdditionalVolume `json:"additional,omitempty"` }
PGBackRestVolumesSpec defines the configuration for pgBackRest additional volumes
func (*PGBackRestVolumesSpec) DeepCopy ¶
func (in *PGBackRestVolumesSpec) DeepCopy() *PGBackRestVolumesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBackRestVolumesSpec.
func (*PGBackRestVolumesSpec) DeepCopyInto ¶
func (in *PGBackRestVolumesSpec) DeepCopyInto(out *PGBackRestVolumesSpec)
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 // --- // # Logging // +kubebuilder:validation:XValidation:rule=`!has(self.logfile) || self.logfile.endsWith('.log')`,message=`logfile config must end with '.log'` // +kubebuilder:validation:MaxProperties=50 // See also XValidation rule on v1 PostgresProxySpec // // +optional // +mapType=granular 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 ¶
func (in *PGBouncerConfiguration) DeepCopy() *PGBouncerConfiguration
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,omitzero"` // 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,omitzero"` // 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"` Volumes *PGBouncerVolumesSpec `json:"volumes,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 PGBouncerVolumesSpec ¶
type PGBouncerVolumesSpec struct { // Additional pre-existing volumes to add to the pod. // --- // +optional // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=10 Additional []AdditionalVolume `json:"additional,omitempty"` }
PGBouncerVolumesSpec defines the configuration for pgBouncer additional volumes
func (*PGBouncerVolumesSpec) DeepCopy ¶
func (in *PGBouncerVolumesSpec) DeepCopy() *PGBouncerVolumesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGBouncerVolumesSpec.
func (*PGBouncerVolumesSpec) DeepCopyInto ¶
func (in *PGBouncerVolumesSpec) DeepCopyInto(out *PGBouncerVolumesSpec)
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 PGUpgrade ¶
type PGUpgrade struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitzero"` // +optional Spec PGUpgradeSpec `json:"spec,omitzero"` // +optional Status PGUpgradeStatus `json:"status,omitzero"` }
PGUpgrade is the Schema for the pgupgrades API
func (*PGUpgrade) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGUpgrade.
func (*PGUpgrade) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PGUpgrade) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PGUpgradeList ¶
type PGUpgradeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitzero"` Items []PGUpgrade `json:"items"` }
PGUpgradeList contains a list of PGUpgrade
func (*PGUpgradeList) DeepCopy ¶
func (in *PGUpgradeList) DeepCopy() *PGUpgradeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGUpgradeList.
func (*PGUpgradeList) DeepCopyInto ¶
func (in *PGUpgradeList) DeepCopyInto(out *PGUpgradeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PGUpgradeList) DeepCopyObject ¶
func (in *PGUpgradeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PGUpgradeSettings ¶
type PGUpgradeSettings struct { // The major version of PostgreSQL before the upgrade. // --- // +kubebuilder:validation:Minimum=11 // +kubebuilder:validation:Maximum=17 // +required FromPostgresVersion int32 `json:"fromPostgresVersion"` // The number of simultaneous processes pg_upgrade should use. // More info: https://www.postgresql.org/docs/current/pgupgrade.html // --- // +kubebuilder:validation:Minimum=0 // +optional Jobs int32 `json:"jobs,omitempty"` // The major version of PostgreSQL to be upgraded to. // --- // +kubebuilder:validation:Minimum=11 // +kubebuilder:validation:Maximum=17 // +required ToPostgresVersion int32 `json:"toPostgresVersion"` // The method pg_upgrade should use to transfer files to the new cluster. // More info: https://www.postgresql.org/docs/current/pgupgrade.html // --- // Different versions of the tool have different methods. // - Copy and Link forever: https://git.postgresql.org/gitweb/?p=postgresql.git;f=src/bin/pg_upgrade/pg_upgrade.h;hb=REL_10_0#l232 // - Clone since 12: https://git.postgresql.org/gitweb/?p=postgresql.git;f=src/bin/pg_upgrade/pg_upgrade.h;hb=REL_12_0#l232 // - CopyFileRange since 17: https://git.postgresql.org/gitweb/?p=postgresql.git;f=src/bin/pg_upgrade/pg_upgrade.h;hb=REL_17_0#l251 // // +kubebuilder:validation:Enum={Clone,Copy,CopyFileRange,Link} // +optional TransferMethod string `json:"transferMethod,omitempty"` }
Arguments and settings for the pg_upgrade tool. See: https://www.postgresql.org/docs/current/pgupgrade.html --- +kubebuilder:validation:XValidation:rule=`self.fromPostgresVersion < self.toPostgresVersion` +kubebuilder:validation:XValidation:rule=`!has(self.transferMethod) || (self.toPostgresVersion < 12 ? self.transferMethod in ["Copy","Link"] : true)`,message="Only Copy or Link before PostgreSQL 12" +kubebuilder:validation:XValidation:rule=`!has(self.transferMethod) || (self.toPostgresVersion < 17 ? self.transferMethod in ["Clone","Copy","Link"] : true)`,message="Only Clone, Copy, or Link before PostgreSQL 17"
func (*PGUpgradeSettings) DeepCopy ¶
func (in *PGUpgradeSettings) DeepCopy() *PGUpgradeSettings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGUpgradeSettings.
func (*PGUpgradeSettings) DeepCopyInto ¶
func (in *PGUpgradeSettings) DeepCopyInto(out *PGUpgradeSettings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PGUpgradeSpec ¶
type PGUpgradeSpec struct { // +optional Metadata *Metadata `json:"metadata,omitempty"` // The name of the Postgres cluster to upgrade. // --- // +kubebuilder:validation:MinLength=1 // +required PostgresClusterName string `json:"postgresClusterName"` // The image name to use for major PostgreSQL upgrades. // +optional 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 PGUpgrade pods to restart. // https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Resource requirements for the PGUpgrade container. // +optional Resources corev1.ResourceRequirements `json:"resources,omitzero"` // 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"` PGUpgradeSettings `json:",inline"` }
PGUpgradeSpec defines the desired state of PGUpgrade
func (*PGUpgradeSpec) DeepCopy ¶
func (in *PGUpgradeSpec) DeepCopy() *PGUpgradeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGUpgradeSpec.
func (*PGUpgradeSpec) DeepCopyInto ¶
func (in *PGUpgradeSpec) DeepCopyInto(out *PGUpgradeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PGUpgradeStatus ¶
type PGUpgradeStatus struct { // conditions represent the observations of PGUpgrade's current state. // +optional // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` // observedGeneration represents the .metadata.generation on which the status was based. // +optional // +kubebuilder:validation:Minimum=0 ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
PGUpgradeStatus defines the observed state of PGUpgrade
func (*PGUpgradeStatus) DeepCopy ¶
func (in *PGUpgradeStatus) DeepCopy() *PGUpgradeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PGUpgradeStatus.
func (*PGUpgradeStatus) DeepCopyInto ¶
func (in *PGUpgradeStatus) DeepCopyInto(out *PGUpgradeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PatroniLogConfig ¶
type PatroniLogConfig struct { // Limits the total amount of space taken by Patroni log files. // Minimum value is 25MB. // More info: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity // --- // TODO(validation) TODO(k8s-1.29): Validate the minimum using CEL libraries. // // +required StorageLimit *resource.Quantity `json:"storageLimit"` // The Patroni log level. // More info: https://docs.python.org/3/library/logging.html#levels // --- // +default="INFO" // +kubebuilder:validation:Enum={CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET} // +optional Level *string `json:"level,omitempty"` }
func (*PatroniLogConfig) DeepCopy ¶
func (in *PatroniLogConfig) DeepCopy() *PatroniLogConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatroniLogConfig.
func (*PatroniLogConfig) DeepCopyInto ¶
func (in *PatroniLogConfig) DeepCopyInto(out *PatroniLogConfig)
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/dynamic_configuration.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"` // Patroni log configuration settings. // +optional Logging *PatroniLogConfig `json:"logging,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 PostgresAuthenticationSpec ¶
type PostgresAuthenticationSpec struct { // Postgres compares every new connection to these rules in the order they are // defined. The first rule that matches determines if and how the connection // must then authenticate. Connections that match no rules are disconnected. // // When this is omitted or empty, Postgres accepts encrypted connections to any // database from users that have a password. To refuse all network connections, // set this to one rule that matches "host" connections to the "reject" method. // // More info: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html // --- // +kubebuilder:validation:MaxItems=10 // +listType=atomic // +optional Rules []PostgresHBARuleSpec `json:"rules,omitempty"` }
func (*PostgresAuthenticationSpec) DeepCopy ¶
func (in *PostgresAuthenticationSpec) DeepCopy() *PostgresAuthenticationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresAuthenticationSpec.
func (*PostgresAuthenticationSpec) DeepCopyInto ¶
func (in *PostgresAuthenticationSpec) DeepCopyInto(out *PostgresAuthenticationSpec)
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"` // +optional metav1.ObjectMeta `json:"metadata,omitzero"` // +optional Spec PostgresClusterSpec `json:"spec,omitzero"` // +optional Status PostgresClusterStatus `json:"status,omitzero"` }
PostgresCluster is the Schema for the postgresclusters API
func NewPostgresCluster ¶
func NewPostgresCluster() *PostgresCluster
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,omitzero"` // 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"` // Volumes to add to Restore Job Pods // +optional Volumes *PGBackRestVolumesSpec `json:"volumes,omitempty"` }
PostgresClusterDataSource defines a data source for bootstrapping PostgreSQL clusters using a an existing PostgresCluster.
func (*PostgresClusterDataSource) DeepCopy ¶
func (in *PostgresClusterDataSource) DeepCopy() *PostgresClusterDataSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresClusterDataSource.
func (*PostgresClusterDataSource) DeepCopyInto ¶
func (in *PostgresClusterDataSource) DeepCopyInto(out *PostgresClusterDataSource)
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,omitzero"` 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"` // Authentication settings for the PostgreSQL server // +optional Authentication *PostgresAuthenticationSpec `json:"authentication,omitempty"` // PostgreSQL backup configuration // +optional Backups Backups `json:"backups,omitzero"` // General configuration of the PostgreSQL server // +optional Config *PostgresConfigSpec `json:"config,omitempty"` // 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"` // Configuration for the OpenTelemetry collector container used to collect // logs and metrics. // +optional Instrumentation *InstrumentationSpec `json:"instrumentation,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 *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=11 // +kubebuilder:validation:Maximum=17 // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1 PostgresVersion int32 `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"` // Specification of the service that exposes PostgreSQL replica instances // +optional ReplicaService *ServiceSpec `json:"replicaService,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 // --- // +kubebuilder:validation:Optional // // Containers should not run with a root GID. // - https://kubernetes.io/docs/concepts/security/pod-security-standards/ // +kubebuilder:validation:items:Minimum=1 // // Supplementary GIDs must fit within int32. // - https://releases.k8s.io/v1.18.0/pkg/apis/core/validation/validation.go#L3659-L3663 // - https://releases.k8s.io/v1.22.0/pkg/apis/core/validation/validation.go#L3923-L3927 // +kubebuilder:validation:items:Maximum=2147483647 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 // +kubebuilder:validation:MaxItems=64 // +optional Users []PostgresUserSpec `json:"users,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,omitzero"` // Status information for pgBackRest // +optional PGBackRest *PGBackRestStatus `json:"pgbackrest,omitempty"` // +optional RegistrationRequired *RegistrationRequirementStatus `json:"registrationRequired,omitempty"` // +optional TokenRequired string `json:"tokenRequired,omitempty"` // Stores the current PostgreSQL major version following a successful // major PostgreSQL upgrade. // +optional PostgresVersion int32 `json:"postgresVersion"` // Current state of the PostgreSQL proxy. // +optional Proxy PostgresProxyStatus `json:"proxy,omitzero"` // 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,omitzero"` // 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 ¶
func (in *PostgresClusterStatus) DeepCopy() *PostgresClusterStatus
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 PostgresConfigSpec ¶
type PostgresConfigSpec struct { // Files to mount under "/etc/postgres". // --- // +optional Files []corev1.VolumeProjection `json:"files,omitempty"` // Configuration parameters for the PostgreSQL server. Some values will // be reloaded without validation and some cause PostgreSQL to restart. // Some values cannot be changed at all. // More info: https://www.postgresql.org/docs/current/runtime-config.html // --- // // Postgres 17 has something like 350+ built-in parameters, but typically // an administrator will change only a handful of these. // +kubebuilder:validation:MaxProperties=50 // // # File Locations // - https://www.postgresql.org/docs/current/runtime-config-file-locations.html // // +kubebuilder:validation:XValidation:rule=`!has(self.config_file) && !has(self.data_directory)`,message=`cannot change PGDATA path: config_file, data_directory` // +kubebuilder:validation:XValidation:rule=`!has(self.external_pid_file)`,message=`cannot change external_pid_file` // +kubebuilder:validation:XValidation:rule=`!has(self.hba_file) && !has(self.ident_file)`,message=`cannot change authentication path: hba_file, ident_file` // // # Connections // - https://www.postgresql.org/docs/current/runtime-config-connection.html // // +kubebuilder:validation:XValidation:rule=`!has(self.listen_addresses)`,message=`network connectivity is always enabled: listen_addresses` // +kubebuilder:validation:XValidation:rule=`!has(self.port)`,message=`change port using .spec.port instead` // +kubebuilder:validation:XValidation:rule=`!has(self.ssl) && !self.exists(k, k.startsWith("ssl_"))`,message=`TLS is always enabled` // +kubebuilder:validation:XValidation:rule=`!self.exists(k, k.startsWith("unix_socket_"))`,message=`domain socket paths cannot be changed` // // # Write Ahead Log // - https://www.postgresql.org/docs/current/runtime-config-wal.html // // +kubebuilder:validation:XValidation:rule=`!has(self.wal_level) || self.wal_level in ["logical"]`,message=`wal_level must be "replica" or higher` // +kubebuilder:validation:XValidation:rule=`!has(self.wal_log_hints)`,message=`wal_log_hints are always enabled` // +kubebuilder:validation:XValidation:rule=`!has(self.archive_mode) && !has(self.archive_command) && !has(self.restore_command)` // +kubebuilder:validation:XValidation:rule=`!has(self.recovery_target) && !self.exists(k, k.startsWith("recovery_target_"))` // // # Replication // - https://www.postgresql.org/docs/current/runtime-config-replication.html // // +kubebuilder:validation:XValidation:rule=`!has(self.hot_standby)`,message=`hot_standby is always enabled` // +kubebuilder:validation:XValidation:rule=`!has(self.synchronous_standby_names)` // +kubebuilder:validation:XValidation:rule=`!has(self.primary_conninfo) && !has(self.primary_slot_name)` // +kubebuilder:validation:XValidation:rule=`!has(self.recovery_min_apply_delay)`,message=`delayed replication is not supported at this time` // // # Logging // - https://www.postgresql.org/docs/current/runtime-config-logging.html // // +kubebuilder:validation:XValidation:rule=`!has(self.cluster_name)`,message=`cluster_name is derived from the PostgresCluster name` // +kubebuilder:validation:XValidation:rule=`!has(self.logging_collector)`,message=`disabling logging_collector is unsafe` // +kubebuilder:validation:XValidation:rule=`!has(self.log_file_mode)`,message=`log_file_mode cannot be changed` // // +mapType=granular // +optional Parameters map[string]intstr.IntOrString `json:"parameters,omitempty"` }
func (*PostgresConfigSpec) DeepCopy ¶
func (in *PostgresConfigSpec) DeepCopy() *PostgresConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresConfigSpec.
func (*PostgresConfigSpec) DeepCopyInto ¶
func (in *PostgresConfigSpec) DeepCopyInto(out *PostgresConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresHBARule ¶
type PostgresHBARule struct { // The connection transport this rule matches. Typical values are: // 1. "host" for network connections that may or may not be encrypted. // 2. "hostssl" for network connections encrypted using TLS. // 3. "hostgssenc" for network connections encrypted using GSSAPI. // --- // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=20 // +kubebuilder:validation:Pattern=`^[-a-z0-9]+$` // +optional Connection string `json:"connection,omitempty"` // Which databases this rule matches. When omitted or empty, this rule matches all databases. // --- // +kubebuilder:validation:MaxItems=20 // +listType=atomic // +optional Databases []PostgresIdentifier `json:"databases,omitempty"` // The authentication method to use when a connection matches this rule. // The special value "reject" refuses connections that match this rule. // // More info: https://www.postgresql.org/docs/current/auth-methods.html // --- // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=20 // +kubebuilder:validation:Pattern=`^[-a-z0-9]+$` // +kubebuilder:validation:XValidation:rule=`self != "trust"`,message=`the "trust" method is unsafe` // +optional Method string `json:"method,omitempty"` // Additional settings for this rule or its authentication method. // --- // +kubebuilder:validation:MaxProperties=20 // +mapType=atomic // +optional Options map[string]intstr.IntOrString `json:"options,omitempty"` // Which user names this rule matches. When omitted or empty, this rule matches all users. // --- // +kubebuilder:validation:MaxItems=20 // +listType=atomic // +optional Users []PostgresIdentifier `json:"users,omitempty"` }
---
func (*PostgresHBARule) DeepCopy ¶
func (in *PostgresHBARule) DeepCopy() *PostgresHBARule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresHBARule.
func (*PostgresHBARule) DeepCopyInto ¶
func (in *PostgresHBARule) DeepCopyInto(out *PostgresHBARule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresHBARuleSpec ¶
type PostgresHBARuleSpec struct { // One line of the "pg_hba.conf" file. Changes to this value will be automatically reloaded without validation. // --- // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=100 // +kubebuilder:validation:Pattern=`^[[:print:]]+$` // +kubebuilder:validation:XValidation:rule=`!self.trim().startsWith("include")`,message=`cannot include other files` // +optional HBA string `json:"hba,omitempty"` PostgresHBARule `json:",inline"` }
--- Emulate OpenAPI "anyOf" aka Kubernetes union. +kubebuilder:validation:XValidation:rule=`[has(self.hba), has(self.connection) || has(self.databases) || has(self.method) || has(self.options) || has(self.users)].exists_one(b,b)`,message=`"hba" cannot be combined with other fields` +kubebuilder:validation:XValidation:rule=`has(self.hba) || (has(self.connection) && has(self.method))`,message=`"connection" and "method" are required`
Some authentication methods *must* be further configured via options.
https://git.postgresql.org/gitweb/?p=postgresql.git;hb=refs/tags/REL_10_0;f=src/backend/libpq/hba.c#l1501 https://git.postgresql.org/gitweb/?p=postgresql.git;hb=refs/tags/REL_17_0;f=src/backend/libpq/hba.c#l1886 +kubebuilder:validation:XValidation:message=`the "ldap" method requires an "ldapbasedn", "ldapprefix", or "ldapsuffix" option`,rule=`has(self.hba) || self.method != "ldap" || (has(self.options) && ["ldapbasedn","ldapprefix","ldapsuffix"].exists(k, k in self.options))` +kubebuilder:validation:XValidation:message=`cannot use "ldapbasedn", "ldapbinddn", "ldapbindpasswd", "ldapsearchattribute", or "ldapsearchfilter" options with "ldapprefix" or "ldapsuffix" options`,rule=`has(self.hba) || self.method != "ldap" || !has(self.options) || 2 > size([["ldapprefix","ldapsuffix"], ["ldapbasedn","ldapbinddn","ldapbindpasswd","ldapsearchattribute","ldapsearchfilter"]].filter(a, a.exists(k, k in self.options)))`
https://git.postgresql.org/gitweb/?p=postgresql.git;hb=refs/tags/REL_10_0;f=src/backend/libpq/hba.c#l1539 https://git.postgresql.org/gitweb/?p=postgresql.git;hb=refs/tags/REL_17_0;f=src/backend/libpq/hba.c#l1945 +kubebuilder:validation:XValidation:message=`the "radius" method requires "radiusservers" and "radiussecrets" options`,rule=`has(self.hba) || self.method != "radius" || (has(self.options) && ["radiusservers","radiussecrets"].all(k, k in self.options))`
+structType=atomic
func (*PostgresHBARuleSpec) DeepCopy ¶
func (in *PostgresHBARuleSpec) DeepCopy() *PostgresHBARuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresHBARuleSpec.
func (*PostgresHBARuleSpec) DeepCopyInto ¶
func (in *PostgresHBARuleSpec) DeepCopyInto(out *PostgresHBARuleSpec)
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. - 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 // --- // +required DataVolumeClaimSpec VolumeClaimSpecWithAutoGrow `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,omitzero"` // 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 *VolumeClaimSpecWithAutoGrow `json:"walVolumeClaimSpec,omitempty"` // The list of tablespaces volumes to mount for this postgrescluster // This field requires enabling TablespaceVolumes feature gate // +listType=map // +listMapKey=name // +optional TablespaceVolumes []TablespaceVolume `json:"tablespaceVolumes,omitempty"` // Volumes to be added to the instance set. // +optional Volumes *PostgresVolumesSpec `json:"volumes,omitempty"` }
func (*PostgresInstanceSetSpec) DeepCopy ¶
func (in *PostgresInstanceSetSpec) DeepCopy() *PostgresInstanceSetSpec
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"` // Desired Size of the pgData volume // +optional DesiredPGDataVolume map[string]string `json:"desiredPGDataVolume,omitempty"` // Desired Size of the pgWAL volume // +optional DesiredPGWALVolume map[string]string `json:"desiredPGWALVolume,omitempty"` }
func (*PostgresInstanceSetStatus) DeepCopy ¶
func (in *PostgresInstanceSetStatus) DeepCopy() *PostgresInstanceSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresInstanceSetStatus.
func (*PostgresInstanceSetStatus) DeepCopyInto ¶
func (in *PostgresInstanceSetStatus) DeepCopyInto(out *PostgresInstanceSetStatus)
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} // +required Type string `json:"type"` }
func (*PostgresPasswordSpec) DeepCopy ¶
func (in *PostgresPasswordSpec) DeepCopy() *PostgresPasswordSpec
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 { // +optional PGBouncer PGBouncerPodStatus `json:"pgBouncer,omitzero"` }
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. // +optional PGAdmin PGAdminPodStatus `json:"pgAdmin,omitzero"` }
PostgresUserInterfaceStatus is a union of the supported PostgreSQL user interface statuses.
func (*PostgresUserInterfaceStatus) DeepCopy ¶
func (in *PostgresUserInterfaceStatus) DeepCopy() *PostgresUserInterfaceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresUserInterfaceStatus.
func (*PostgresUserInterfaceStatus) DeepCopyInto ¶
func (in *PostgresUserInterfaceStatus) DeepCopyInto(out *PostgresUserInterfaceStatus)
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. // --- // This value goes into the name of a corev1.Secret and a label value, so // it must match both IsDNS1123Subdomain and IsValidLabelValue. // - https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsDNS1123Subdomain // - https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsValidLabelValue // // This is IsDNS1123Subdomain without any dots, U+002E: // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$` // // +required 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:MaxLength=200 // +kubebuilder:validation:Pattern=`^[^;]*$` // +kubebuilder:validation:XValidation:rule=`!self.matches("(?i:PASSWORD)")`,message="cannot assign password" // +kubebuilder:validation:XValidation:rule=`!self.matches("(?:--|/[*]|[*]/)")`,message="cannot contain comments" // +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 PostgresVolumesSpec ¶
type PostgresVolumesSpec struct { // Additional pre-existing volumes to add to the pod. // --- // +optional // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=10 Additional []AdditionalVolume `json:"additional,omitempty"` // An ephemeral volume for temporary files. // More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes // --- // +optional Temp *VolumeClaimSpec `json:"temp,omitempty"` }
func (*PostgresVolumesSpec) DeepCopy ¶
func (in *PostgresVolumesSpec) DeepCopy() *PostgresVolumesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresVolumesSpec.
func (*PostgresVolumesSpec) DeepCopyInto ¶
func (in *PostgresVolumesSpec) DeepCopyInto(out *PostgresVolumesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegistrationRequirementStatus ¶
type RegistrationRequirementStatus struct {
PGOVersion string `json:"pgoVersion,omitempty"`
}
func (*RegistrationRequirementStatus) DeepCopy ¶
func (in *RegistrationRequirementStatus) DeepCopy() *RegistrationRequirementStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrationRequirementStatus.
func (*RegistrationRequirementStatus) DeepCopyInto ¶
func (in *RegistrationRequirementStatus) DeepCopyInto(out *RegistrationRequirementStatus)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoAzure.
func (*RepoAzure) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoGCS.
func (*RepoGCS) DeepCopyInto ¶
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 // --- // +required VolumeClaimSpec VolumeClaimSpecWithAutoGrow `json:"volumeClaimSpec"` }
RepoPVC represents a pgBackRest repository that is created using a PersistentVolumeClaim
func (*RepoPVC) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoPVC.
func (*RepoPVC) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoS3.
func (*RepoS3) DeepCopyInto ¶
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, // Utilized to detect changes to these fields and then execute pgBackRest stanza-create // commands accordingly. // +optional RepoOptionsHash string `json:"repoOptionsHash,omitempty"` // Desired Size of the repo volume // +optional DesiredRepoVolume string `json:"desiredRepoVolume,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 ¶
--- SchemalessObject is a map compatible with JSON object.
Use with the following markers:
- kubebuilder:pruning:PreserveUnknownFields
- kubebuilder:validation:Schemaless
- kubebuilder:validation:Type=object
NOTE: PreserveUnknownFields allows arbitrary values within fields of this type but also prevents any validation rules from reaching inside; its CEL type is "object" or "message" with zero fields: https://kubernetes.io/docs/reference/using-api/cel/#type-system-integration
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 SecretKeyRef ¶
type SecretKeyRef struct { // Name of the Secret. // --- // https://pkg.go.dev/k8s.io/kubernetes/pkg/apis/core/validation#ValidateSecretName // +required Name DNS1123Subdomain `json:"name"` // Name of the data field within the Secret. // --- // https://releases.k8s.io/v1.32.0/pkg/apis/core/validation/validation.go#L2867 // https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsConfigMapKey // +required Key ConfigDataKey `json:"key"` }
+structType=atomic
func (*SecretKeyRef) AsProjection ¶
func (in *SecretKeyRef) AsProjection(path string) corev1.SecretProjection
AsProjection returns a copy of this as a corev1.SecretProjection.
func (*SecretKeyRef) DeepCopy ¶
func (in *SecretKeyRef) DeepCopy() *SecretKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeyRef.
func (*SecretKeyRef) DeepCopyInto ¶
func (in *SecretKeyRef) DeepCopyInto(out *SecretKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerGroup ¶
type ServerGroup struct { // The name for the ServerGroup in pgAdmin. // Must be unique in the pgAdmin's ServerGroups since it becomes the ServerGroup name in pgAdmin. // +kubebuilder:validation:Required Name string `json:"name"` // PostgresClusterName selects one cluster to add to pgAdmin by name. // +kubebuilder:validation:Optional PostgresClusterName string `json:"postgresClusterName,omitempty"` // PostgresClusterSelector selects clusters to dynamically add to pgAdmin by matching labels. // An empty selector like `{}` will select ALL clusters in the namespace. // +kubebuilder:validation:Optional PostgresClusterSelector metav1.LabelSelector `json:"postgresClusterSelector,omitzero"` }
+kubebuilder:validation:XValidation:rule=`[has(self.postgresClusterName),has(self.postgresClusterSelector)].exists_one(x,x)`,message=`exactly one of "postgresClusterName" or "postgresClusterSelector" is required`
func (*ServerGroup) DeepCopy ¶
func (in *ServerGroup) DeepCopy() *ServerGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroup.
func (*ServerGroup) DeepCopyInto ¶
func (in *ServerGroup) DeepCopyInto(out *ServerGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceSpec ¶
type ServiceSpec struct { // +optional Metadata *Metadata `json:"metadata,omitempty"` // 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"` // More info: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/ // --- // +optional // +kubebuilder:validation:Enum=SingleStack;PreferDualStack;RequireDualStack IPFamilyPolicy *corev1.IPFamilyPolicy `json:"ipFamilyPolicy,omitempty"` // +optional // +kubebuilder:validation:items:Enum={IPv4,IPv6} IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"` // More info: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-policies // --- // +optional // +kubebuilder:validation:Enum={Cluster,Local} InternalTrafficPolicy *corev1.ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty"` // More info: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-policies // --- // Kubernetes assumes the evaluation cost of an enum value is very large. // +optional // +kubebuilder:validation:Enum={Cluster,Local} ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"` }
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.
func (*Sidecar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StandalonePGAdminConfiguration ¶
type StandalonePGAdminConfiguration struct { // Files allows the user to mount projected volumes into the pgAdmin // container so that files can be referenced by pgAdmin as needed. // +optional Files []corev1.VolumeProjection `json:"files,omitempty"` // A Secret containing the value for the CONFIG_DATABASE_URI setting. // More info: https://www.pgadmin.org/docs/pgadmin4/latest/external_database.html // +optional ConfigDatabaseURI *OptionalSecretKeyRef `json:"configDatabaseURI,omitempty"` // Settings for the Gunicorn server. // More info: https://docs.gunicorn.org/en/latest/settings.html // +optional // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=object Gunicorn SchemalessObject `json:"gunicorn,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 *OptionalSecretKeyRef `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 // --- // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=object // // +mapType=granular // +optional Settings SchemalessObject `json:"settings,omitempty"` // Secrets for the `OAUTH2_CONFIG` setting. If there are `OAUTH2_CONFIG` values // in the settings field, they will be combined with the values loaded here. // More info: https://www.pgadmin.org/docs/pgadmin4/latest/oauth2.html // --- // The controller expects this number to be no more than two digits. // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=10 // // +listType=map // +listMapKey=name // +optional OAuthConfigurations []PGAdminOAuthConfig `json:"oauthConfigurations,omitempty"` }
PGAdminConfiguration represents pgAdmin configuration files.
func (*StandalonePGAdminConfiguration) DeepCopy ¶
func (in *StandalonePGAdminConfiguration) DeepCopy() *StandalonePGAdminConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandalonePGAdminConfiguration.
func (*StandalonePGAdminConfiguration) DeepCopyInto ¶
func (in *StandalonePGAdminConfiguration) DeepCopyInto(out *StandalonePGAdminConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TablespaceVolume ¶
type TablespaceVolume struct { // The name for the tablespace, used as the path name for the volume. // Must be unique in the instance set since they become the directory names. // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Pattern=`^[a-z][a-z0-9]*$` // +kubebuilder:validation:Type=string Name string `json:"name"` // Defines a PersistentVolumeClaim for a tablespace. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes // --- // +required DataVolumeClaimSpec VolumeClaimSpec `json:"dataVolumeClaimSpec"` }
func (*TablespaceVolume) DeepCopy ¶
func (in *TablespaceVolume) DeepCopy() *TablespaceVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TablespaceVolume.
func (*TablespaceVolume) DeepCopyInto ¶
func (in *TablespaceVolume) DeepCopyInto(out *TablespaceVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradeOperation ¶
type UpgradeOperation struct { Flavor string `json:"flavor"` StartingFrom string `json:"starting_from"` State string `json:"state"` }
func (*UpgradeOperation) DeepCopy ¶
func (in *UpgradeOperation) DeepCopy() *UpgradeOperation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeOperation.
func (*UpgradeOperation) DeepCopyInto ¶
func (in *UpgradeOperation) DeepCopyInto(out *UpgradeOperation)
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.
type VolumeClaimSpec ¶
type VolumeClaimSpec corev1.PersistentVolumeClaimSpec
--- NOTE(validation): Every PVC must have at least one accessMode. NOTE(KEP-5073) TODO(k8s-1.28): fieldPath=`.accessModes`,reason="FieldValueRequired" - https://releases.k8s.io/v1.25.0/pkg/apis/core/validation/validation.go#L2098-L2100 - https://releases.k8s.io/v1.32.0/pkg/apis/core/validation/validation.go#L2303-L2305 +kubebuilder:validation:XValidation:rule=`0 < size(self.accessModes)`,message=`missing accessModes`
NOTE(validation): Every PVC must have a positive storage request. NOTE(KEP-5073) TODO(k8s-1.28): fieldPath=`.resources.requests.storage`,reason="FieldValueRequired" TODO(k8s-1.29): `&& 0 < quantity(self.resources.requests.storage).sign()` - https://releases.k8s.io/v1.25.0/pkg/apis/core/validation/validation.go#L2126-L2133 - https://releases.k8s.io/v1.32.0/pkg/apis/core/validation/validation.go#L2329-L2336 +kubebuilder:validation:XValidation:rule=`has(self.resources.requests.storage)`,message=`missing storage request`
+structType=atomic
func (*VolumeClaimSpec) AsPersistentVolumeClaimSpec ¶
func (spec *VolumeClaimSpec) AsPersistentVolumeClaimSpec() corev1.PersistentVolumeClaimSpec
AsPersistentVolumeClaimSpec returns a copy of spec as a corev1.PersistentVolumeClaimSpec.
func (*VolumeClaimSpec) DeepCopy ¶
func (in *VolumeClaimSpec) DeepCopy() *VolumeClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeClaimSpec.
func (*VolumeClaimSpec) DeepCopyInto ¶
func (spec *VolumeClaimSpec) DeepCopyInto(out *VolumeClaimSpec)
DeepCopyInto copies the receiver into out. Both must be non-nil.
type VolumeClaimSpecWithAutoGrow ¶
type VolumeClaimSpecWithAutoGrow struct { VolumeClaimSpec `json:",inline"` // +optional AutoGrow *AutoGrowSpec `json:"autoGrow,omitempty"` }
VolumeClaimSpecWithAutoGrow extends VolumeClaimSpec with options for automatic volume growth. +structType=atomic
func (*VolumeClaimSpecWithAutoGrow) AsPersistentVolumeClaimSpec ¶
func (spec *VolumeClaimSpecWithAutoGrow) AsPersistentVolumeClaimSpec() corev1.PersistentVolumeClaimSpec
AsPersistentVolumeClaimSpec returns a copy of the embedded VolumeClaimSpec as a corev1.PersistentVolumeClaimSpec.
func (*VolumeClaimSpecWithAutoGrow) DeepCopy ¶
func (in *VolumeClaimSpecWithAutoGrow) DeepCopy() *VolumeClaimSpecWithAutoGrow
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeClaimSpecWithAutoGrow.
func (*VolumeClaimSpecWithAutoGrow) DeepCopyInto ¶
func (spec *VolumeClaimSpecWithAutoGrow) DeepCopyInto(out *VolumeClaimSpecWithAutoGrow)
type VolumeSnapshots ¶
type VolumeSnapshots struct { // Name of the VolumeSnapshotClass that should be used by VolumeSnapshots // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 VolumeSnapshotClassName string `json:"volumeSnapshotClassName"` }
VolumeSnapshots defines the configuration for VolumeSnapshots
func (*VolumeSnapshots) DeepCopy ¶
func (in *VolumeSnapshots) DeepCopy() *VolumeSnapshots
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshots.
func (*VolumeSnapshots) DeepCopyInto ¶
func (in *VolumeSnapshots) DeepCopyInto(out *VolumeSnapshots)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files
¶
- config_types.go
- crunchy_bridgecluster_types.go
- groupversion_info.go
- instrumentation_types.go
- patroni_types.go
- pgadmin_types.go
- pgbackrest_types.go
- pgbouncer_types.go
- pgmonitor_types.go
- pgupgrade_types.go
- postgres_types.go
- postgrescluster_types.go
- shared_types.go
- standalone_pgadmin_types.go
- zz_generated.deepcopy.go