API Reference
=============

Package v1 contains API Schema definitions for the postgresql v1 API
group

Resource Types
--------------

- :ref:`Appendix A - Common object stores for backups <Appendix A - Common object stores for backups>` 

- :ref:`Replica Clusters <Replica Clusters>` 

- :ref:`ClusterImageCatalog <ClusterImageCatalog>` 

- :ref:`PostgreSQL Database Management <PostgreSQL Database Management>` 

- :ref:`ClusterImageCatalog <ClusterImageCatalog>` 

- :ref:`Pooler configuration <Pooler configuration>` 

- :ref:`Publications <Publications>` 

- :ref:`ScheduledBackup <ScheduledBackup>` 

- :ref:`Subscriptions <Subscriptions>` 

Backup
------

Backup is the Schema for the backups API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`Backup`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_BackupSpec_ <#postgresql-k8s-enterprisedb-io-v1-BackupSpec>` ,Specification of the desired behavior of the backup. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  `status`  :ref:`_BackupStatus_ <#postgresql-k8s-enterprisedb-io-v1-BackupStatus>` ,Most recently observed status of the backup. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Cluster
-------

Cluster is the Schema for the PostgreSQL API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`Cluster`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_ClusterSpec_ <#postgresql-k8s-enterprisedb-io-v1-ClusterSpec>` ,Specification of the desired behavior of the cluster. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  `status`  :ref:`_ClusterStatus_ <#postgresql-k8s-enterprisedb-io-v1-ClusterStatus>` ,Most recently observed status of the cluster. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

ClusterImageCatalog
-------------------

ClusterImageCatalog is the Schema for the clusterimagecatalogs API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`ClusterImageCatalog`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_ImageCatalogSpec_ <#postgresql-k8s-enterprisedb-io-v1-ImageCatalogSpec>` ,Specification of the desired behavior of the ClusterImageCatalog. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Database
--------

Database is the Schema for the databases API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`Database`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_DatabaseSpec_ <#postgresql-k8s-enterprisedb-io-v1-DatabaseSpec>` ,Specification of the desired Database. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  `status`  :ref:`_DatabaseStatus_ <#postgresql-k8s-enterprisedb-io-v1-DatabaseStatus>` ,Most recently observed status of the Database. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

ImageCatalog
------------

ImageCatalog is the Schema for the imagecatalogs API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`ImageCatalog`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_ImageCatalogSpec_ <#postgresql-k8s-enterprisedb-io-v1-ImageCatalogSpec>` ,Specification of the desired behavior of the ImageCatalog. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Pooler
------

Pooler is the Schema for the poolers API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`Pooler`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_PoolerSpec_ <#postgresql-k8s-enterprisedb-io-v1-PoolerSpec>` ,Specification of the desired behavior of the Pooler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  `status`  :ref:`_PoolerStatus_ <#postgresql-k8s-enterprisedb-io-v1-PoolerStatus>` ,Most recently observed status of the Pooler. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Publication
-----------

Publication is the Schema for the publications API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`Publication`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_PublicationSpec_ <#postgresql-k8s-enterprisedb-io-v1-PublicationSpec>` ,No description provided.
  `status`  ** :ref:`Required]**  [_PublicationStatus_ <#postgresql-k8s-enterprisedb-io-v1-PublicationStatus>` ,No description provided.

ScheduledBackup
---------------

ScheduledBackup is the Schema for the scheduledbackups API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`ScheduledBackup`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_ScheduledBackupSpec_ <#postgresql-k8s-enterprisedb-io-v1-ScheduledBackupSpec>` ,Specification of the desired behavior of the ScheduledBackup. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  `status`  :ref:`_ScheduledBackupStatus_ <#postgresql-k8s-enterprisedb-io-v1-ScheduledBackupStatus>` ,Most recently observed status of the ScheduledBackup. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Subscription
------------

Subscription is the Schema for the subscriptions API

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `apiVersion`  **[Required]**  string,`postgresql.k8s.enterprisedb.io/v1`
  `kind`  **[Required]**  string,`Subscription`
  `metadata`  **  `Required]**  [_meta/v1.ObjectMeta_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta>`__ ,No description provided.Refer to the Kubernetes API documentation for the fields of the `metadata` field.
  `spec`  ** :ref:`Required]**  [_SubscriptionSpec_ <#postgresql-k8s-enterprisedb-io-v1-SubscriptionSpec>` ,No description provided.
  `status`  ** :ref:`Required]**  [_SubscriptionStatus_ <#postgresql-k8s-enterprisedb-io-v1-SubscriptionStatus>` ,No description provided.

AffinityConfiguration
---------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

AffinityConfiguration contains the info we need to create the affinity
rules for Pods

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `enablePodAntiAffinity` _bool_,Activates anti-affinity for the pods. The operator will define pods anti-affinity unless this field is explicitly set to false
  `topologyKey` _string_,TopologyKey to use for anti-affinity configuration. See k8s documentation for more info on that
  `nodeSelector` _map[string]string_,NodeSelector is map of key-value pairs used to define the nodes on which the pods can run. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
  `nodeAffinity`   `_core/v1.NodeAffinity_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#nodeaffinity-v1-core>`__ ,NodeAffinity describes node affinity scheduling rules for the pod. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  `tolerations`   `_[]core/v1.Toleration_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#toleration-v1-core>`__ ,"Tolerations is a list of Tolerations that should be set for all the pods, in order to allow them to run on tainted nodes. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/"
  `podAntiAffinityType` _string_,"PodAntiAffinityType allows the user to decide whether pod anti-affinity between cluster instance has to be considered a strong requirement during scheduling or not. Allowed values are: ""preferred"" (default if empty) or ""required"". Setting it to ""required"", could lead to instances remaining pending until new kubernetes nodes are added if all the existing nodes don't match the required pod anti-affinity rule. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity"
  `additionalPodAntiAffinity`   `_core/v1.PodAntiAffinity_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#podantiaffinity-v1-core>`__ ,AdditionalPodAntiAffinity allows to specify pod anti-affinity terms to be added to the ones generated by the operator if EnablePodAntiAffinity is set to true (default) or to be used exclusively if set to false.
  `additionalPodAffinity`   `_core/v1.PodAffinity_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#podaffinity-v1-core>`__ ,AdditionalPodAffinity allows to specify pod affinity terms to be passed to all the cluster's pods.

AvailableArchitecture
---------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

AvailableArchitecture represents the state of a cluster’s architecture

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `goArch`  **[Required]**  _string_,GoArch is the name of the executable architecture
  `hash`  **[Required]**  _string_,Hash is the hash of the executable

BackupConfiguration
-------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

BackupConfiguration defines how the backup of the cluster are taken. The
supported backup methods are BarmanObjectStore and VolumeSnapshot. For
details and examples refer to the Backup and Recovery section of the
documentation

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `volumeSnapshot`  :ref:`_VolumeSnapshotConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-VolumeSnapshotConfiguration>` ,VolumeSnapshot provides the configuration for the execution of volume snapshot backups.
  `barmanObjectStore`   `_github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanObjectStoreConfiguration_ <https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#BarmanObjectStoreConfiguration>`__ ,The configuration for the barman-cloud tool suite
  `retentionPolicy` _string_,"RetentionPolicy is the retention policy to be used for backups and WALs (i.e. '60d'). The retention policy is expressed in the form of `XXu` where `XX` is a positive integer and `u` is in `[dwm]`- days, weeks, months. It's currently only applicable when using the BarmanObjectStore method."
  `target`  :ref:`_BackupTarget_ <#postgresql-k8s-enterprisedb-io-v1-BackupTarget>` ,"The policy to decide which instance should perform backups. Available options are empty string, which will default to `prefer-standby` policy, `primary` to have backups run always on primary instances, `prefer-standby` to have backups run preferably on the most updated standby, if available."

BackupMethod
------------

(Alias of ``string`` )

**Appears in:**

- :ref:`BackupSpec <BackupSpec>` 

- :ref:`BackupStatus <BackupStatus>` 

- :ref:`ScheduledBackupSpec <ScheduledBackupSpec>` 

BackupMethod defines the way of executing the physical base backups of
the selected PostgreSQL instance

BackupPhase
-----------

(Alias of ``string`` )

**Appears in:**

- :ref:`BackupStatus <BackupStatus>` 

BackupPhase is the phase of the backup

BackupPluginConfiguration
-------------------------

**Appears in:**

- :ref:`BackupSpec <BackupSpec>` 

- :ref:`ScheduledBackupSpec <ScheduledBackupSpec>` 

BackupPluginConfiguration contains the backup configuration used by the
backup plugin

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,Name is the name of the plugin managing this backup
  `parameters` _map[string]string_,Parameters are the configuration parameters passed to the backup plugin for this backup

BackupSnapshotElementStatus
---------------------------

**Appears in:**

- :ref:`BackupSnapshotStatus <BackupSnapshotStatus>` 

BackupSnapshotElementStatus is a volume snapshot that is part of a
volume snapshot method backup

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,Name is the snapshot resource name
  `type`  **[Required]**  _string_,"Type is tho role of the snapshot in the cluster, such as PG_DATA, PG_WAL and PG_TABLESPACE"
  `tablespaceName` _string_,TablespaceName is the name of the snapshotted tablespace. Only set when type is PG_TABLESPACE

BackupSnapshotStatus
--------------------

**Appears in:**

- :ref:`BackupStatus <BackupStatus>` 

BackupSnapshotStatus the fields exclusive to the volumeSnapshot method
backup

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `elements`  :ref:`_[]BackupSnapshotElementStatus_ <#postgresql-k8s-enterprisedb-io-v1-BackupSnapshotElementStatus>` ,"The elements list, populated with the gathered volume snapshots"

BackupSource
------------

**Appears in:**

- :ref:`BootstrapRecovery <BootstrapRecovery>` 

BackupSource contains the backup we need to restore from, plus some
information that could be needed to correctly restore it.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `LocalObjectReference`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,(Members of `LocalObjectReference` are embedded into this type.) No description provided.
  `endpointCA`   `_github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector>`__ ,EndpointCA store the CA bundle of the barman endpoint. Useful when using self-signed certificates to avoid errors with certificate issuer and barman-cloud-wal-archive.

BackupSpec
----------

**Appears in:**

- :ref:`Appendix A - Common object stores for backups <Appendix A - Common object stores for backups>` 

BackupSpec defines the desired state of Backup

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `cluster`  **  `Required]**  [_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,The cluster to backup
  `target`  :ref:`_BackupTarget_ <#postgresql-k8s-enterprisedb-io-v1-BackupTarget>` ,"The policy to decide which instance should perform this backup. If empty, it defaults to `cluster.spec.backup.target`. Available options are empty string, `primary` and `prefer-standby`. `primary` to have backups run always on primary instances, `prefer-standby` to have backups run preferably on the most updated standby, if available."
  `method`  :ref:`_BackupMethod_ <#postgresql-k8s-enterprisedb-io-v1-BackupMethod>` ,"The backup method to be used, possible options are `barmanObjectStore`, `volumeSnapshot` or `plugin`. Defaults to: `barmanObjectStore`."
  `pluginConfiguration`  :ref:`_BackupPluginConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-BackupPluginConfiguration>` ,Configuration parameters passed to the plugin managing this backup
  `online` _bool_,"Whether the default type of backup with volume snapshots is online/hot (`true`, default) or offline/cold (`false`) Overrides the default setting specified in the cluster field '.spec.backup.volumeSnapshot.online'"
  `onlineConfiguration`  :ref:`_OnlineConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-OnlineConfiguration>` ,Configuration parameters to control the online/hot backup with volume snapshots Overrides the default settings specified in the cluster '.backup.volumeSnapshot.onlineConfiguration' stanza

BackupStatus
------------

**Appears in:**

- :ref:`Appendix A - Common object stores for backups <Appendix A - Common object stores for backups>` 

BackupStatus defines the observed state of Backup

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `BarmanCredentials`   `_github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanCredentials_ <https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#BarmanCredentials>`__ ,(Members of `BarmanCredentials` are embedded into this type.) The potential credentials for each cloud provider
  `endpointCA`   `_github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector>`__ ,EndpointCA store the CA bundle of the barman endpoint. Useful when using self-signed certificates to avoid errors with certificate issuer and barman-cloud-wal-archive.
  `endpointURL` _string_,"Endpoint to be used to upload data to the cloud, overriding the automatic endpoint discovery"
  `destinationPath` _string_,"The path where to store the backup (i.e. s3://bucket/path/to/folder) this path, with different destination folders, will be used for WALs and for data. This may not be populated in case of errors."
  `serverName` _string_,"The server name on S3, the cluster name is used if this parameter is omitted"
  `encryption` _string_,Encryption method required to S3 API
  `backupId` _string_,The ID of the Barman backup
  `backupName` _string_,The Name of the Barman backup
  `phase`  :ref:`_BackupPhase_ <#postgresql-k8s-enterprisedb-io-v1-BackupPhase>` ,The last backup status
  `startedAt`   `_meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,When the backup was started
  `stoppedAt`   `_meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,When the backup was terminated
  `beginWal` _string_,The starting WAL
  `endWal` _string_,The ending WAL
  `beginLSN` _string_,The starting xlog
  `endLSN` _string_,The ending xlog
  `error` _string_,The detected error
  `commandOutput` _string_,Unused. Retained for compatibility with old versions.
  `commandError` _string_,The backup command output in case of error
  `backupLabelFile` _[]byte_,Backup label file content as returned by Postgres in case of online (hot) backups
  `tablespaceMapFile` _[]byte_,Tablespace map file content as returned by Postgres in case of online (hot) backups
  `instanceID`  :ref:`_InstanceID_ <#postgresql-k8s-enterprisedb-io-v1-InstanceID>` ,Information to identify the instance where the backup has been taken from
  `snapshotBackupStatus`  :ref:`_BackupSnapshotStatus_ <#postgresql-k8s-enterprisedb-io-v1-BackupSnapshotStatus>` ,Status of the volumeSnapshot backup
  `method`  :ref:`_BackupMethod_ <#postgresql-k8s-enterprisedb-io-v1-BackupMethod>` ,The backup method being used
  `online` _bool_,Whether the backup was online/hot (`true`) or offline/cold (`false`)
  `pluginMetadata` _map[string]string_,A map containing the plugin metadata

BackupTarget
------------

(Alias of ``string`` )

**Appears in:**

- :ref:`BackupConfiguration <BackupConfiguration>` 

- :ref:`BackupSpec <BackupSpec>` 

- :ref:`ScheduledBackupSpec <ScheduledBackupSpec>` 

BackupTarget describes the preferred targets for a backup

BootstrapConfiguration
----------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

BootstrapConfiguration contains information about how to create the
PostgreSQL cluster. Only a single bootstrap method can be defined among
the supported ones. ``initdb`` will be used as the bootstrap method if
left unspecified. Refer to the Bootstrap page of the documentation for
more information.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `initdb`  :ref:`_BootstrapInitDB_ <#postgresql-k8s-enterprisedb-io-v1-BootstrapInitDB>` ,Bootstrap the cluster via initdb
  `recovery`  :ref:`_BootstrapRecovery_ <#postgresql-k8s-enterprisedb-io-v1-BootstrapRecovery>` ,Bootstrap the cluster from a backup
  `pg_basebackup`  :ref:`_BootstrapPgBaseBackup_ <#postgresql-k8s-enterprisedb-io-v1-BootstrapPgBaseBackup>` ,Bootstrap the cluster taking a physical backup of another compatible PostgreSQL instance

BootstrapInitDB
---------------

**Appears in:**

- :ref:`BootstrapConfiguration <BootstrapConfiguration>` 

BootstrapInitDB is the configuration of the bootstrap process when
initdb is used Refer to the Bootstrap page of the documentation for more
information.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `database` _string_,Name of the database used by the application. Default: `app`.
  `owner` _string_,Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key.
  `secret`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch
  `redwood` _bool_,If we need to enable/disable Redwood compatibility. Requires EPAS and for EPAS defaults to true
  `options` _[]string_,"The list of options that must be passed to initdb when creating the cluster. Deprecated: This could lead to inconsistent configurations, please use the explicit provided parameters instead. If defined, explicit values will be ignored."
  `dataChecksums` _bool_,"Whether the `-k` option should be passed to initdb, enabling checksums on data pages (default: `false`)"
  `encoding` _string_,The value to be passed as option `--encoding` for initdb (default:`UTF8`)
  `localeCollate` _string_,The value to be passed as option `--lc-collate` for initdb (default:`C`)
  `localeCType` _string_,The value to be passed as option `--lc-ctype` for initdb (default:`C`)
  `locale` _string_,Sets the default collation order and character classification in the new database.
  `localeProvider` _string_,This option sets the locale provider for databases created in the new cluster. Available from PostgreSQL 16.
  `icuLocale` _string_,Specifies the ICU locale when the ICU provider is used. This option requires `localeProvider` to be set to `icu`. Available from PostgreSQL 15.
  `icuRules` _string_,Specifies additional collation rules to customize the behavior of the default collation. This option requires `localeProvider` to be set to `icu`. Available from PostgreSQL 16.
  `builtinLocale` _string_,Specifies the locale name when the builtin provider is used. This option requires `localeProvider` to be set to `builtin`. Available from PostgreSQL 17.
  `walSegmentSize` _int_,"The value in megabytes (1 to 1024) to be passed to the `--wal-segsize` option for initdb (default: empty, resulting in PostgreSQL default: 16MB)"
  `postInitSQL` _[]string_,List of SQL queries to be executed as a superuser in the `postgres` database right after the cluster has been created- to be used with extreme care (by default empty)
  `postInitApplicationSQL` _[]string_,List of SQL queries to be executed as a superuser in the application database right after the cluster has been created- to be used with extreme care (by default empty)
  `postInitTemplateSQL` _[]string_,List of SQL queries to be executed as a superuser in the `template1` database right after the cluster has been created- to be used with extreme care (by default empty)
  `import`  :ref:`_Import_ <#postgresql-k8s-enterprisedb-io-v1-Import>` ,Bootstraps the new cluster by importing data from an existing PostgreSQL instance using logical backup (`pg_dump` and `pg_restore`)
  `postInitApplicationSQLRefs`  :ref:`_SQLRefs_ <#postgresql-k8s-enterprisedb-io-v1-SQLRefs>` ,"List of references to ConfigMaps or Secrets containing SQL files to be executed as a superuser in the application database right after the cluster has been created. The references are processed in a specific order: first, all Secrets are processed, followed by all ConfigMaps. Within each group, the processing order follows the sequence specified in their respective arrays. (by default empty)"
  `postInitTemplateSQLRefs`  :ref:`_SQLRefs_ <#postgresql-k8s-enterprisedb-io-v1-SQLRefs>` ,"List of references to ConfigMaps or Secrets containing SQL files to be executed as a superuser in the `template1` database right after the cluster has been created. The references are processed in a specific order: first, all Secrets are processed, followed by all ConfigMaps. Within each group, the processing order follows the sequence specified in their respective arrays. (by default empty)"
  `postInitSQLRefs`  :ref:`_SQLRefs_ <#postgresql-k8s-enterprisedb-io-v1-SQLRefs>` ,"List of references to ConfigMaps or Secrets containing SQL files to be executed as a superuser in the `postgres` database right after the cluster has been created. The references are processed in a specific order: first, all Secrets are processed, followed by all ConfigMaps. Within each group, the processing order follows the sequence specified in their respective arrays. (by default empty)"

BootstrapPgBaseBackup
---------------------

**Appears in:**

- :ref:`BootstrapConfiguration <BootstrapConfiguration>` 

BootstrapPgBaseBackup contains the configuration required to take a
physical backup of an existing PostgreSQL cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `source`  **[Required]**  _string_,The name of the server of which we need to take a physical backup
  `database` _string_,Name of the database used by the application. Default: `app`.
  `owner` _string_,Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key.
  `secret`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch

BootstrapRecovery
-----------------

**Appears in:**

- :ref:`BootstrapConfiguration <BootstrapConfiguration>` 

BootstrapRecovery contains the configuration required to restore from an
existing cluster using 3 methodologies: external cluster, volume
snapshots or backup objects. Full recovery and Point-In-Time Recovery
are supported. The method can be also be used to create clusters in
continuous recovery (replica clusters), also supporting cascading
replication when ``instances`` >

1. Once the cluster exits recovery, the password for the superuser will
   be changed through the provided secret. Refer to the Bootstrap page
   of the documentation for more information.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `backup`  :ref:`_BackupSource_ <#postgresql-k8s-enterprisedb-io-v1-BackupSource>` ,The backup object containing the physical base backup from which to initiate the recovery procedure. Mutually exclusive with `source` and `volumeSnapshots`.
  `source` _string_,"The external cluster whose backup we will restore. This is also used as the name of the folder under which the backup is stored, so it must be set to the name of the source cluster Mutually exclusive with `backup`."
  `volumeSnapshots`  :ref:`_DataSource_ <#postgresql-k8s-enterprisedb-io-v1-DataSource>` ,"The static PVC data source(s) from which to initiate the recovery procedure. Currently supporting `VolumeSnapshot` and `PersistentVolumeClaim` resources that map an existing PVC group, compatible with EDB CloudNativePG Cluster, and taken with a cold backup copy on a fenced Postgres instance (limitation which will be removed in the future when online backup will be implemented). Mutually exclusive with `backup`."
  `recoveryTarget`  :ref:`_RecoveryTarget_ <#postgresql-k8s-enterprisedb-io-v1-RecoveryTarget>` ,"By default, the recovery process applies all the available WAL files in the archive (full recovery). However, you can also end the recovery as soon as a consistent state is reached or recover to a point-in-time (PITR) by specifying a `RecoveryTarget` object, as expected by PostgreSQL (i.e., timestamp, transaction Id, LSN, ...). More info: https://www.postgresql.org/docs/current/runtime-config-wal.html#RUNTIME-CONFIG-WAL-RECOVERY-TARGET"
  `database` _string_,Name of the database used by the application. Default: `app`.
  `owner` _string_,Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key.
  `secret`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch

CatalogImage
------------

**Appears in:**

- :ref:`ImageCatalogSpec <ImageCatalogSpec>` 

CatalogImage defines the image and major version

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `image`  **[Required]**  _string_,The image reference
  `major`  **[Required]**  _int_,The PostgreSQL major version of the image. Must be unique within the catalog.

CertificatesConfiguration
-------------------------

**Appears in:**

- :ref:`CertificatesStatus <CertificatesStatus>` 

- :ref:`ClusterSpec <ClusterSpec>` 

CertificatesConfiguration contains the needed configurations to handle
server certificates.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `serverCASecret` _string_,"The secret containing the Server CA certificate. If not defined, a new secret will be created with a self-signed CA and will be used to generate the TLS certificate ServerTLSSecret. Contains: _ `ca.crt`: CA that should be used to validate the server certificate, used as `sslrootcert` in client connection strings. _ `ca.key`: key used to generate Server SSL certs, if ServerTLSSecret is provided, this can be omitted."
  `serverTLSSecret` _string_,"The secret of type kubernetes.io/tls containing the server TLS certificate and key that will be set as `ssl_cert_file` and `ssl_key_file` so that clients can connect to postgres securely. If not defined, ServerCASecret must provide also `ca.key` and a new secret will be created using the provided CA."
  `replicationTLSSecret` _string_,"The secret of type kubernetes.io/tls containing the client certificate to authenticate as the `streaming_replica` user. If not defined, ClientCASecret must provide also `ca.key`, and a new secret will be created using the provided CA."
  `clientCASecret` _string_,"The secret containing the Client CA certificate. If not defined, a new secret will be created with a self-signed CA and will be used to generate all the client certificates. Contains: _ `ca.crt`: CA that should be used to validate the client certificates, used as `ssl_ca_file` of all the instances. _ `ca.key`: key used to generate client certificates, if ReplicationTLSSecret is provided, this can be omitted."
  `serverAltDNSNames` _[]string_,"The list of the server alternative DNS names to be added to the generated server TLS certificates, when required."

CertificatesStatus
------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

CertificatesStatus contains configuration certificates and related
expiration dates.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `CertificatesConfiguration`  :ref:`_CertificatesConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-CertificatesConfiguration>` ,"(Members of `CertificatesConfiguration` are embedded into this type.) Needed configurations to handle server certificates, initialized with default values, if needed."
  `expirations` _map[string]string_,Expiration dates for all certificates.

ClusterMonitoringTLSConfiguration
---------------------------------

**Appears in:**

- :ref:`MonitoringConfiguration <MonitoringConfiguration>` 

ClusterMonitoringTLSConfiguration is the type containing the TLS
configuration for the cluster’s monitoring

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `enabled` _bool_,Enable TLS for the monitoring endpoint. Changing this option will force a rollout of all instances.

ClusterSpec
-----------

**Appears in:**

- :ref:`Replica Clusters <Replica Clusters>` 

ClusterSpec defines the desired state of Cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `description` _string_,Description of this PostgreSQL cluster
  `inheritedMetadata`  :ref:`_EmbeddedObjectMetadata_ <#postgresql-k8s-enterprisedb-io-v1-EmbeddedObjectMetadata>` ,Metadata that will be inherited by all objects related to the Cluster
  `imageName` _string_,"Name of the container image, supporting both tags (`<image>:<tag>`) and digests for deterministic and repeatable deployments (`<image>:<tag>@sha256:<digestValue>`)"
  `imageCatalogRef`  :ref:`_ImageCatalogRef_ <#postgresql-k8s-enterprisedb-io-v1-ImageCatalogRef>` ,Defines the major PostgreSQL version we want to use within an ImageCatalog
  `imagePullPolicy`   `_core/v1.PullPolicy_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#pullpolicy-v1-core>`__ ,"Image pull policy. One of `Always`, `Never` or `IfNotPresent`. If not defined, it defaults to `IfNotPresent`. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containerimages#updating-images"
  `schedulerName` _string_,"If specified, the pod will be dispatched by specified Kubernetes scheduler. If not specified, the pod will be dispatched by the default scheduler. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/"
  `postgresUID` _int64_,"The UID of the `postgres` user inside the image, defaults to `26`"
  `postgresGID` _int64_,"The GID of the `postgres` user inside the image, defaults to `26`"
  `instances`  **[Required]**  _int_,Number of instances required in the cluster
  `minSyncReplicas` _int_,Minimum number of instances required in synchronous replication with the primary. Undefined or 0 allow writes to complete when no standby is available.
  `maxSyncReplicas` _int_,"The target value for the synchronous replication quorum, that can be decreased if the number of ready standbys is lower than this. Undefined or 0 disable synchronous replication."
  `postgresql`  :ref:`_PostgresConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-PostgresConfiguration>` ,Configuration of the PostgreSQL server
  `replicationSlots`  :ref:`_ReplicationSlotsConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-ReplicationSlotsConfiguration>` ,Replication slots management configuration
  `bootstrap`  :ref:`_BootstrapConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-BootstrapConfiguration>` ,Instructions to bootstrap this cluster
  `replica`  :ref:`_ReplicaClusterConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-ReplicaClusterConfiguration>` ,Replica cluster configuration
  `superuserSecret`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,The secret containing the superuser password. If not defined a new secret will be created with a randomly generated password
  `enableSuperuserAccess` _bool_,"When this option is enabled, the operator will use the `SuperuserSecret` to update the `postgres` user password (if the secret is not present, the operator will automatically create one). When this option is disabled, the operator will ignore the `SuperuserSecret` content, delete it when automatically created, and then blank the password of the `postgres` user by setting it to `NULL`. Disabled by default."
  `certificates`  :ref:`_CertificatesConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-CertificatesConfiguration>` ,The configuration for the CA and related certificates
  `imagePullSecrets`   `_[]github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,The list of pull secrets to be used to pull the images. If the license key contains a pull secret that secret will be automatically included.
  `storage`  :ref:`_StorageConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-StorageConfiguration>` ,Configuration of the storage of the instances
  `serviceAccountTemplate`  :ref:`_ServiceAccountTemplate_ <#postgresql-k8s-enterprisedb-io-v1-ServiceAccountTemplate>` ,Configure the generation of the service account
  `walStorage`  :ref:`_StorageConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-StorageConfiguration>` ,Configuration of the storage for PostgreSQL WAL (Write-Ahead Log)
  `ephemeralVolumeSource`   `_core/v1.EphemeralVolumeSource_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#ephemeralvolumesource-v1-core>`__ ,EphemeralVolumeSource allows the user to configure the source of ephemeral volumes.
  `startDelay` _int32_,The time in seconds that is allowed for a PostgreSQL instance to successfully start up (default 3600). The startup probe failure threshold is derived from this value using the formula: ceiling(startDelay / 10).
  `stopDelay` _int32_,The time in seconds that is allowed for a PostgreSQL instance to gracefully shutdown (default 1800)
  `smartStopDelay` _int32_,Deprecated: please use SmartShutdownTimeout instead
  `smartShutdownTimeout` _int32_,The time in seconds that controls the window of time reserved for the smart shutdown of Postgres to complete. Make sure you reserve enough time for the operator to request a fast shutdown of Postgres (that is: `stopDelay`- `smartShutdownTimeout`).
  `switchoverDelay` _int32_,The time in seconds that is allowed for a primary PostgreSQL instance to gracefully shutdown during a switchover. Default value is 3600 seconds (1 hour).
  `failoverDelay` _int32_,The amount of time (in seconds) to wait before triggering a failover after the primary PostgreSQL instance in the cluster was detected to be unhealthy
  `livenessProbeTimeout` _int32_,LivenessProbeTimeout is the time (in seconds) that is allowed for a PostgreSQL instance to successfully respond to the liveness probe (default 30). The Liveness probe failure threshold is derived from this value using the formula: ceiling(livenessProbe / 10).
  `affinity`  :ref:`_AffinityConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-AffinityConfiguration>` ,Affinity/Anti-affinity rules for Pods
  `topologySpreadConstraints`   `_[]core/v1.TopologySpreadConstraint_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#topologyspreadconstraint-v1-core>`__ ,TopologySpreadConstraints specifies how to spread matching pods among the given topology. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
  `resources`   `_core/v1.ResourceRequirements_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#resourcerequirements-v1-core>`__ ,Resources requirements of every generated Pod. Please refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for more information.
  `ephemeralVolumesSizeLimit`  :ref:`_EphemeralVolumesSizeLimitConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-EphemeralVolumesSizeLimitConfiguration>` ,EphemeralVolumesSizeLimit allows the user to set the limits for the ephemeral volumes
  `priorityClassName` _string_,"Name of the priority class which will be used in every generated Pod, if the PriorityClass specified does not exist, the pod will not be able to schedule. Please refer to https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more information"
  `primaryUpdateStrategy`  :ref:`_PrimaryUpdateStrategy_ <#postgresql-k8s-enterprisedb-io-v1-PrimaryUpdateStrategy>` ,"Deployment strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be automated (`unsupervised`- default) or manual (`supervised`)"
  `primaryUpdateMethod`  :ref:`_PrimaryUpdateMethod_ <#postgresql-k8s-enterprisedb-io-v1-PrimaryUpdateMethod>` ,"Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be with a switchover (`switchover`) or in-place (`restart`- default)"
  `backup`  :ref:`_BackupConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-BackupConfiguration>` ,The configuration to be used for backups
  `nodeMaintenanceWindow`  :ref:`_NodeMaintenanceWindow_ <#postgresql-k8s-enterprisedb-io-v1-NodeMaintenanceWindow>` ,Define a maintenance window for the Kubernetes nodes
  `licenseKey` _string_,"The license key of the cluster. When empty, the cluster operates in trial mode and after the expiry date (default 30 days) the operator will cease any reconciliation attempt. For details, please refer to the license agreement that comes with the operator."
  `licenseKeySecret`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,The reference to the license key. When this is set it take precedence over LicenseKey.
  `monitoring`  :ref:`_MonitoringConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-MonitoringConfiguration>` ,The configuration of the monitoring infrastructure of this cluster
  `externalClusters`  :ref:`_[]ExternalCluster_ <#postgresql-k8s-enterprisedb-io-v1-ExternalCluster>` ,The list of external clusters which are used in the configuration
  `logLevel` _string_,"The instances' log level, one of the following values: error, warning, info (default), debug, trace"
  `projectedVolumeTemplate`   `_core/v1.ProjectedVolumeSource_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#projectedvolumesource-v1-core>`__ ,"Template to be used to define projected volumes, projected volumes will be mounted under `/projected` base folder"
  `env`   `_[]core/v1.EnvVar_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#envvar-v1-core>`__ ,Env follows the Env format to pass environment variables to the pods created in the cluster
  `envFrom`   `_[]core/v1.EnvFromSource_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#envfromsource-v1-core>`__ ,EnvFrom follows the EnvFrom format to pass environment variables sources to the pods to be used by Env
  `managed`  :ref:`_ManagedConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-ManagedConfiguration>` ,The configuration that is used by the portions of PostgreSQL that are managed by the instance manager
  `seccompProfile`   `_core/v1.SeccompProfile_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#seccompprofile-v1-core>`__ ,The SeccompProfile applied to every Pod and Container. Defaults to: `RuntimeDefault`
  `tablespaces`  :ref:`_[]TablespaceConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-TablespaceConfiguration>` ,The tablespaces configuration
  `enablePDB` _bool_,"Manage the `PodDisruptionBudget` resources within the cluster. When configured as `true` (default setting), the pod disruption budgets will safeguard the primary node from being terminated. Conversely, setting it to `false` will result in the absence of any `PodDisruptionBudget` resource, permitting the shutdown of all nodes hosting the PostgreSQL cluster. This latter configuration is advisable for any PostgreSQL cluster employed for development/staging purposes."
  `plugins`  :ref:`_[]PluginConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-PluginConfiguration>` ,"The plugins configuration, containing any plugin to be loaded with the corresponding configuration"
  `probes`  :ref:`_ProbesConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-ProbesConfiguration>` ,The configuration of the probes to be injected in the PostgreSQL Pods.

ClusterStatus
-------------

**Appears in:**

- :ref:`Replica Clusters <Replica Clusters>` 

ClusterStatus defines the observed state of Cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `instances` _int_,The total number of PVC Groups detected in the cluster. It may differ from the number of existing instance pods.
  `readyInstances` _int_,The total number of ready instances in the cluster. It is equal to the number of ready instance pods.
  `instancesStatus` _map[PodStatus][]string_,InstancesStatus indicates in which status the instances are
  `instancesReportedState`  :ref:`_map[PodName]InstanceReportedState_ <#postgresql-k8s-enterprisedb-io-v1-InstanceReportedState>` ,The reported state of the instances during the last reconciliation loop
  `managedRolesStatus`  :ref:`_ManagedRoles_ <#postgresql-k8s-enterprisedb-io-v1-ManagedRoles>` ,ManagedRolesStatus reports the state of the managed roles in the cluster
  `tablespacesStatus`  :ref:`_[]TablespaceState_ <#postgresql-k8s-enterprisedb-io-v1-TablespaceState>` ,TablespacesStatus reports the state of the declarative tablespaces in the cluster
  `timelineID` _int_,The timeline of the Postgres cluster
  `topology`  :ref:`_Topology_ <#postgresql-k8s-enterprisedb-io-v1-Topology>` ,Instances topology.
  `latestGeneratedNode` _int_,ID of the latest generated node (used to avoid node name clashing)
  `currentPrimary` _string_,Current primary instance
  `targetPrimary` _string_,"Target primary instance, this is different from the previous one during a switchover or a failover"
  `lastPromotionToken` _string_,LastPromotionToken is the last verified promotion token that was used to promote a replica cluster
  `pvcCount` _int32_,How many PVCs have been created by this cluster
  `jobCount` _int32_,How many Jobs have been created by this cluster
  `danglingPVC` _[]string_,List of all the PVCs created by this cluster and still available which are not attached to a Pod
  `resizingPVC` _[]string_,List of all the PVCs that have ResizingPVC condition.
  `initializingPVC` _[]string_,List of all the PVCs that are being initialized by this cluster
  `healthyPVC` _[]string_,List of all the PVCs not dangling nor initializing
  `unusablePVC` _[]string_,List of all the PVCs that are unusable because another PVC is missing
  `licenseStatus` _github.com/EnterpriseDB/cloud-native-postgres/pkg/licensekey.Status_,Status of the license
  `writeService` _string_,Current write pod
  `readService` _string_,Current list of read pods
  `phase` _string_,Current phase of the cluster
  `phaseReason` _string_,Reason for the current phase
  `secretsResourceVersion`  :ref:`_SecretsResourceVersion_ <#postgresql-k8s-enterprisedb-io-v1-SecretsResourceVersion>` ,"The list of resource versions of the secrets managed by the operator. Every change here is done in the interest of the instance manager, which will refresh the secret data"
  `configMapResourceVersion`  :ref:`_ConfigMapResourceVersion_ <#postgresql-k8s-enterprisedb-io-v1-ConfigMapResourceVersion>` ,"The list of resource versions of the configmaps, managed by the operator. Every change here is done in the interest of the instance manager, which will refresh the configmap data"
  `certificates`  :ref:`_CertificatesStatus_ <#postgresql-k8s-enterprisedb-io-v1-CertificatesStatus>` ,"The configuration for the CA and related certificates, initialized with defaults."
  `firstRecoverabilityPoint` _string_,"The first recoverability point, stored as a date in RFC3339 format. This field is calculated from the content of FirstRecoverabilityPointByMethod"
  `firstRecoverabilityPointByMethod`   `_map[BackupMethod]meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,"The first recoverability point, stored as a date in RFC3339 format, per backup method type"
  `lastSuccessfulBackup` _string_,"Last successful backup, stored as a date in RFC3339 format This field is calculated from the content of LastSuccessfulBackupByMethod"
  `lastSuccessfulBackupByMethod`   `_map[BackupMethod]meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,"Last successful backup, stored as a date in RFC3339 format, per backup method type"
  `lastFailedBackup` _string_,Stored as a date in RFC3339 format
  `cloudNativePostgresqlCommitHash` _string_,The commit hash number of which this operator running
  `currentPrimaryTimestamp` _string_,The timestamp when the last actual promotion to primary has occurred
  `currentPrimaryFailingSinceTimestamp` _string_,The timestamp when the primary was detected to be unhealthy This field is reported when `.spec.failoverDelay` is populated or during online upgrades
  `targetPrimaryTimestamp` _string_,The timestamp when the last request for a new primary has occurred
  `poolerIntegrations`  :ref:`_PoolerIntegrations_ <#postgresql-k8s-enterprisedb-io-v1-PoolerIntegrations>` ,The integration needed by poolers referencing the cluster
  `cloudNativePostgresqlOperatorHash` _string_,The hash of the binary of the operator
  `availableArchitectures`  :ref:`_[]AvailableArchitecture_ <#postgresql-k8s-enterprisedb-io-v1-AvailableArchitecture>` ,AvailableArchitectures reports the available architectures of a cluster
  `conditions`   `_[]meta/v1.Condition_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta>`__ ,Conditions for cluster object
  `instanceNames` _[]string_,List of instance names in the cluster
  `onlineUpdateEnabled` _bool_,OnlineUpdateEnabled shows if the online upgrade is enabled inside the cluster
  `azurePVCUpdateEnabled` _bool_,AzurePVCUpdateEnabled shows if the PVC online upgrade is enabled for this cluster
  `image` _string_,Image contains the image name used by the pods
  `pluginStatus`  :ref:`_[]PluginStatus_ <#postgresql-k8s-enterprisedb-io-v1-PluginStatus>` ,PluginStatus is the status of the loaded plugins
  `switchReplicaClusterStatus`  :ref:`_SwitchReplicaClusterStatus_ <#postgresql-k8s-enterprisedb-io-v1-SwitchReplicaClusterStatus>` ,SwitchReplicaClusterStatus is the status of the switch to replica cluster
  `demotionToken` _string_,"DemotionToken is a JSON token containing the information from pg_controldata such as Database system identifier, Latest checkpoint's TimeLineID, Latest checkpoint's REDO location, Latest checkpoint's REDO WAL file, and Time of latest checkpoint"

ConfigMapResourceVersion
------------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

ConfigMapResourceVersion is the resource versions of the secrets managed
by the operator

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `metrics` _map[string]string_,"A map with the versions of all the config maps used to pass metrics. Map keys are the config map names, map values are the versions"

DataDurabilityLevel
-------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`SynchronousReplicaConfiguration <SynchronousReplicaConfiguration>` 

DataDurabilityLevel specifies how strictly to enforce synchronous
replication when cluster instances are unavailable. Options are
``required`` or ``preferred`` .

DataSource
----------

**Appears in:**

- :ref:`BootstrapRecovery <BootstrapRecovery>` 

DataSource contains the configuration required to bootstrap a PostgreSQL
cluster from an existing storage

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `storage`  **  `Required]**  [_core/v1.TypedLocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#typedlocalobjectreference-v1-core>`__ ,Configuration of the storage of the instances
  `walStorage`   `_core/v1.TypedLocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#typedlocalobjectreference-v1-core>`__ ,Configuration of the storage for PostgreSQL WAL (Write-Ahead Log)
  `tablespaceStorage`   `_map[string]core/v1.TypedLocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#typedlocalobjectreference-v1-core>`__ ,Configuration of the storage for PostgreSQL tablespaces

DatabaseReclaimPolicy
---------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`DatabaseSpec <DatabaseSpec>` 

DatabaseReclaimPolicy describes a policy for end-of-life maintenance of
databases.

DatabaseRoleRef
---------------

**Appears in:**

- :ref:`TablespaceConfiguration <TablespaceConfiguration>` 

DatabaseRoleRef is a reference an a role available inside PostgreSQL

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name` _string_,No description provided.

DatabaseSpec
------------

**Appears in:**

- :ref:`PostgreSQL Database Management <PostgreSQL Database Management>` 

DatabaseSpec is the specification of a Postgresql Database, built around
the ``CREATE DATABASE`` , ``ALTER DATABASE`` , and ``DROP DATABASE`` SQL
commands of PostgreSQL.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `cluster`  **  `Required]**  [_core/v1.LocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core>`__ ,The name of the PostgreSQL cluster hosting the database.
  `ensure`  :ref:`_EnsureOption_ <#postgresql-k8s-enterprisedb-io-v1-EnsureOption>` ,"Ensure the PostgreSQL database is `present` or `absent`- defaults to ""present""."
  `name`  **[Required]**  _string_,The name of the database to create inside PostgreSQL. This setting cannot be changed.
  `owner`  **[Required]**  _string_,Maps to the `OWNER` parameter of `CREATE DATABASE`. Maps to the `OWNER TO` command of `ALTER DATABASE`. The role name of the user who owns the database inside PostgreSQL.
  `template` _string_,Maps to the `TEMPLATE` parameter of `CREATE DATABASE`. This setting cannot be changed. The name of the template from which to create this database.
  `encoding` _string_,Maps to the `ENCODING` parameter of `CREATE DATABASE`. This setting cannot be changed. Character set encoding to use in the database.
  `locale` _string_,Maps to the `LOCALE` parameter of `CREATE DATABASE`. This setting cannot be changed. Sets the default collation order and character classification in the new database.
  `localeProvider` _string_,Maps to the `LOCALE_PROVIDER` parameter of `CREATE DATABASE`. This setting cannot be changed. This option sets the locale provider for databases created in the new cluster. Available from PostgreSQL 16.
  `localeCollate` _string_,Maps to the `LC_COLLATE` parameter of `CREATE DATABASE`. This setting cannot be changed.
  `localeCType` _string_,Maps to the `LC_CTYPE` parameter of `CREATE DATABASE`. This setting cannot be changed.
  `icuLocale` _string_,Maps to the `ICU_LOCALE` parameter of `CREATE DATABASE`. This setting cannot be changed. Specifies the ICU locale when the ICU provider is used. This option requires `localeProvider` to be set to `icu`. Available from PostgreSQL 15.
  `icuRules` _string_,Maps to the `ICU_RULES` parameter of `CREATE DATABASE`. This setting cannot be changed. Specifies additional collation rules to customize the behavior of the default collation. This option requires `localeProvider` to be set to `icu`. Available from PostgreSQL 16.
  `builtinLocale` _string_,Maps to the `BUILTIN_LOCALE` parameter of `CREATE DATABASE`. This setting cannot be changed. Specifies the locale name when the builtin provider is used. This option requires `localeProvider` to be set to `builtin`. Available from PostgreSQL 17.
  `collationVersion` _string_,Maps to the `COLLATION_VERSION` parameter of `CREATE DATABASE`. This setting cannot be changed.
  `isTemplate` _bool_,"Maps to the `IS_TEMPLATE` parameter of `CREATE DATABASE` and `ALTER DATABASE`. If true, this database is considered a template and can be cloned by any user with `CREATEDB` privileges."
  `allowConnections` _bool_,Maps to the `ALLOW_CONNECTIONS` parameter of `CREATE DATABASE` and `ALTER DATABASE`. If false then no one can connect to this database.
  `connectionLimit` _int_,Maps to the `CONNECTION LIMIT` clause of `CREATE DATABASE` and `ALTER DATABASE`. How many concurrent connections can be made to this database. -1 (the default) means no limit.
  `tablespace` _string_,Maps to the `TABLESPACE` parameter of `CREATE DATABASE`. Maps to the `SET TABLESPACE` command of `ALTER DATABASE`. The name of the tablespace (in PostgreSQL) that will be associated with the new database. This tablespace will be the default tablespace used for objects created in this database.
  `databaseReclaimPolicy`  :ref:`_DatabaseReclaimPolicy_ <#postgresql-k8s-enterprisedb-io-v1-DatabaseReclaimPolicy>` ,The policy for end-of-life maintenance of this database.

DatabaseStatus
--------------

**Appears in:**

- :ref:`PostgreSQL Database Management <PostgreSQL Database Management>` 

DatabaseStatus defines the observed state of Database

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `observedGeneration` _int64_,A sequence number representing the latest desired state that was synchronized
  `applied` _bool_,Applied is true if the database was reconciled correctly
  `message` _string_,Message is the reconciliation output message

EPASConfiguration
-----------------

**Appears in:**

- :ref:`PostgresConfiguration <PostgresConfiguration>` 

EPASConfiguration contains EDB Postgres Advanced Server specific
configurations

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `audit` _bool_,If true enables edb_audit logging
  `tde`  :ref:`_TDEConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-TDEConfiguration>` ,TDE configuration

EmbeddedObjectMetadata
----------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

EmbeddedObjectMetadata contains metadata to be inherited by all
resources related to a Cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `labels` _map[string]string_,No description provided.
  `annotations` _map[string]string_,No description provided.

EnsureOption
------------

(Alias of ``string`` ) **Appears in:**

- :ref:`DatabaseSpec <DatabaseSpec>` 

- :ref:`RoleConfiguration <RoleConfiguration>` 

EnsureOption represents whether we should enforce the presence or
absence of a Role in a PostgreSQL instance

EphemeralVolumesSizeLimitConfiguration
--------------------------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

EphemeralVolumesSizeLimitConfiguration contains the configuration of the
ephemeral storage

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `shm`   `_k8s.io/apimachinery/pkg/api/resource.Quantity_ <https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity>`__ ,Shm is the size limit of the shared memory volume
  `temporaryData`   `_k8s.io/apimachinery/pkg/api/resource.Quantity_ <https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity>`__ ,TemporaryData is the size limit of the temporary data volume

ExternalCluster
---------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ExternalCluster represents the connection parameters to an external
cluster which is used in the other sections of the configuration

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,"The server name, required"
  `connectionParameters` _map[string]string_,"The list of connection parameters, such as dbname, host, username, etc"
  `sslCert`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,The reference to an SSL certificate to be used to connect to this instance
  `sslKey`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,The reference to an SSL private key to be used to connect to this instance
  `sslRootCert`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,The reference to an SSL CA public key to be used to connect to this instance
  `password`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,"The reference to the password to be used to connect to the server. If a password is provided, EDB CloudNativePG Cluster creates a PostgreSQL passfile at `/controller/external/NAME/pass` (where ""NAME"" is the cluster's name). This passfile is automatically referenced in the connection string when establishing a connection to the remote PostgreSQL server from the current PostgreSQL `Cluster`. This ensures secure and efficient password management for external clusters."
  `barmanObjectStore`   `_github.com/cloudnative-pg/barman-cloud/pkg/api.BarmanObjectStoreConfiguration_ <https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#BarmanObjectStoreConfiguration>`__ ,The configuration for the barman-cloud tool suite
  `plugin`  ** :ref:`Required]**  [_PluginConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-PluginConfiguration>` ,The configuration of the plugin that is taking care of WAL archiving and backups for this external cluster

ImageCatalogRef
---------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ImageCatalogRef defines the reference to a major version in an
ImageCatalog

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `TypedLocalObjectReference`   `_core/v1.TypedLocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#typedlocalobjectreference-v1-core>`__ ,(Members of `TypedLocalObjectReference` are embedded into this type.) No description provided.
  `major`  **[Required]**  _int_,The major version of PostgreSQL we want to use from the ImageCatalog

ImageCatalogSpec
----------------

**Appears in:**

- :ref:`ClusterImageCatalog <ClusterImageCatalog>` 

- :ref:`ClusterImageCatalog <ClusterImageCatalog>` 

ImageCatalogSpec defines the desired ImageCatalog

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `images`  ** :ref:`Required]**  [_[]CatalogImage_ <#postgresql-k8s-enterprisedb-io-v1-CatalogImage>` ,List of CatalogImages available in the catalog

Import
------

**Appears in:**

- :ref:`BootstrapInitDB <BootstrapInitDB>` 

Import contains the configuration to init a database from a logic
snapshot of an externalCluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `source`  ** :ref:`Required]**  [_ImportSource_ <#postgresql-k8s-enterprisedb-io-v1-ImportSource>` ,The source of the import
  `type`  ** :ref:`Required]**  [_SnapshotType_ <#postgresql-k8s-enterprisedb-io-v1-SnapshotType>` ,The import type. Can be `microservice` or `monolith`.
  `databases`  **[Required]**  _[]string_,The databases to import
  `roles` _[]string_,The roles to import
  `postImportApplicationSQL` _[]string_,List of SQL queries to be executed as a superuser in the application database right after is imported- to be used with extreme care (by default empty). Only available in microservice type.
  `schemaOnly` _bool_,"When set to true, only the `pre-data` and `post-data` sections of `pg_restore` are invoked, avoiding data import. Default: `false`."
  `pgDumpExtraOptions` _[]string_,"List of custom options to pass to the `pg_dump` command. IMPORTANT: Use these options with caution and at your own risk, as the operator does not validate their content. Be aware that certain options may conflict with the operator's intended functionality or design."
  `pgRestoreExtraOptions` _[]string_,"List of custom options to pass to the `pg_restore` command. IMPORTANT: Use these options with caution and at your own risk, as the operator does not validate their content. Be aware that certain options may conflict with the operator's intended functionality or design."

ImportSource
------------

**Appears in:**

- :ref:`Important OpenShift concepts <Important OpenShift concepts>` 

ImportSource describes the source for the logical snapshot

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `externalCluster`  **[Required]**  _string_,The name of the externalCluster used for import

InstanceID
----------

**Appears in:**

- :ref:`BackupStatus <BackupStatus>` 

InstanceID contains the information to identify an instance

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `podName` _string_,The pod name
  `ContainerID` _string_,The container ID

InstanceReportedState
---------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

InstanceReportedState describes the last reported state of an instance
during a reconciliation loop

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `isPrimary`  **[Required]**  _bool_,indicates if an instance is the primary one
  `timeLineID` _int_,indicates on which TimelineId the instance is

LDAPBindAsAuth
--------------

**Appears in:**

- :ref:`LDAPConfig <LDAPConfig>` 

LDAPBindAsAuth provides the required fields to use the bind
authentication for LDAP

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `prefix` _string_,Prefix for the bind authentication option
  `suffix` _string_,Suffix for the bind authentication option

LDAPBindSearchAuth
------------------

**Appears in:**

- :ref:`LDAPConfig <LDAPConfig>` 

LDAPBindSearchAuth provides the required fields to use the bind+search
LDAP authentication process

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `baseDN` _string_,Root DN to begin the user search
  `bindDN` _string_,DN of the user to bind to the directory
  `bindPassword`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,Secret with the password for the user to bind to the directory
  `searchAttribute` _string_,Attribute to match against the username
  `searchFilter` _string_,Search filter to use when doing the search+bind authentication

LDAPConfig
----------

**Appears in:**

- :ref:`PostgresConfiguration <PostgresConfiguration>` 

LDAPConfig contains the parameters needed for LDAP authentication

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `server` _string_,LDAP hostname or IP address
  `port` _int_,LDAP server port
  `scheme`  :ref:`_LDAPScheme_ <#postgresql-k8s-enterprisedb-io-v1-LDAPScheme>` ,"LDAP schema to be used, possible options are `ldap` and `ldaps`"
  `bindAsAuth`  :ref:`_LDAPBindAsAuth_ <#postgresql-k8s-enterprisedb-io-v1-LDAPBindAsAuth>` ,Bind as authentication configuration
  `bindSearchAuth`  :ref:`_LDAPBindSearchAuth_ <#postgresql-k8s-enterprisedb-io-v1-LDAPBindSearchAuth>` ,Bind+Search authentication configuration
  `tls` _bool_,Set to 'true' to enable LDAP over TLS. 'false' is default

LDAPScheme
----------

(Alias of ``string`` )

**Appears in:**

- :ref:`LDAPConfig <LDAPConfig>` 

LDAPScheme defines the possible schemes for LDAP

ManagedConfiguration
--------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ManagedConfiguration represents the portions of PostgreSQL that are
managed by the instance manager

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `roles`  :ref:`_[]RoleConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-RoleConfiguration>` ,Database roles managed by the `Cluster`
  `services`  :ref:`_ManagedServices_ <#postgresql-k8s-enterprisedb-io-v1-ManagedServices>` ,Services roles managed by the `Cluster`

ManagedRoles
------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

ManagedRoles tracks the status of a cluster’s managed roles

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `byStatus` _map[RoleStatus][]string_,ByStatus gives the list of roles in each state
  `cannotReconcile` _map[string][]string_,"CannotReconcile lists roles that cannot be reconciled in PostgreSQL, with an explanation of the cause"
  `passwordStatus`  :ref:`_map[string]PasswordState_ <#postgresql-k8s-enterprisedb-io-v1-PasswordState>` ,PasswordStatus gives the last transaction id and password secret version for each managed role

ManagedService
--------------

**Appears in:**

- :ref:`ManagedServices <ManagedServices>` 

ManagedService represents a specific service managed by the cluster. It
includes the type of service and its associated template specification.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `selectorType`  ** :ref:`Required]**  [_ServiceSelectorType_ <#postgresql-k8s-enterprisedb-io-v1-ServiceSelectorType>` ,"SelectorType specifies the type of selectors that the service will have. Valid values are ""rw"", ""r"", and ""ro"", representing read-write, read, and read-only services."
  `updateStrategy`  :ref:`_ServiceUpdateStrategy_ <#postgresql-k8s-enterprisedb-io-v1-ServiceUpdateStrategy>` ,UpdateStrategy describes how the service differences should be reconciled
  `serviceTemplate`  ** :ref:`Required]**  [_ServiceTemplateSpec_ <#postgresql-k8s-enterprisedb-io-v1-ServiceTemplateSpec>` ,ServiceTemplate is the template specification for the service.

ManagedServices
---------------

**Appears in:**

- :ref:`ManagedConfiguration <ManagedConfiguration>` 

ManagedServices represents the services managed by the cluster.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `disabledDefaultServices`  :ref:`_[]ServiceSelectorType_ <#postgresql-k8s-enterprisedb-io-v1-ServiceSelectorType>` ,"DisabledDefaultServices is a list of service types that are disabled by default. Valid values are ""r"", and ""ro"", representing read, and read-only services."
  `additional`  :ref:`_[]ManagedService_ <#postgresql-k8s-enterprisedb-io-v1-ManagedService>` ,Additional is a list of additional managed services specified by the user.

Metadata
--------

**Appears in:**

- :ref:`PodTemplateSpec <PodTemplateSpec>` 

- :ref:`ServiceAccountTemplate <ServiceAccountTemplate>` 

- :ref:`ServiceTemplateSpec <ServiceTemplateSpec>` 

Metadata is a structure similar to the metav1.ObjectMeta, but still
parseable by controller-gen to create a suitable CRD for the user. The
comment of PodTemplateSpec has an explanation of why we are not using
the core data types.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name` _string_,The name of the resource. Only supported for certain types
  `labels` _map[string]string_,Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
  `annotations` _map[string]string_,Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations

MonitoringConfiguration
-----------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

MonitoringConfiguration is the type containing all the monitoring
configuration for a certain cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `disableDefaultQueries` _bool_,Whether the default queries should be injected. Set it to `true` if you don't want to inject default queries into the cluster. Default: false.
  `customQueriesConfigMap`   `_[]github.com/cloudnative-pg/machinery/pkg/api.ConfigMapKeySelector_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#ConfigMapKeySelector>`__ ,The list of config maps containing the custom queries
  `customQueriesSecret`   `_[]github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector>`__ ,The list of secrets containing the custom queries
  `enablePodMonitor` _bool_,Enable or disable the `PodMonitor`
  `tls`  :ref:`_ClusterMonitoringTLSConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-ClusterMonitoringTLSConfiguration>` ,Configure TLS communication for the metrics endpoint. Changing tls.enabled option will force a rollout of all instances.
  `podMonitorMetricRelabelings`  :ref:`CloudNativePG <Monitoring>` ,The list of metric relabelings for the `PodMonitor`. Applied to samples before ingestion.
  `podMonitorRelabelings`  :ref:`CloudNativePG <Monitoring>` ,The list of relabelings for the `PodMonitor`. Applied to samples before scraping.

NodeMaintenanceWindow
---------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

NodeMaintenanceWindow contains information that the operator will use
while upgrading the underlying node.

This option is only useful when the chosen storage prevents the Pods
from being freely moved across nodes.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `reusePVC` _bool_,Reuse the existing PVC (wait for the node to come up again) or not (recreate it elsewhere- when `instances` >1)
  `inProgress` _bool_,Is there a node maintenance activity in progress?

OnlineConfiguration
-------------------

**Appears in:**

- :ref:`BackupSpec <BackupSpec>` 

- :ref:`ScheduledBackupSpec <ScheduledBackupSpec>` 

- :ref:`VolumeSnapshotConfiguration <VolumeSnapshotConfiguration>` 

OnlineConfiguration contains the configuration parameters for the online
volume snapshot

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `waitForArchive` _bool_,"If false, the function will return immediately after the backup is completed, without waiting for WAL to be archived. This behavior is only useful with backup software that independently monitors WAL archiving. Otherwise, WAL required to make the backup consistent might be missing and make the backup useless. By default, or when this parameter is true, pg_backup_stop will wait for WAL to be archived when archiving is enabled. On a standby, this means that it will wait only when archive_mode = always. If write activity on the primary is low, it may be useful to run pg_switch_wal on the primary in order to trigger an immediate segment switch."
  `immediateCheckpoint` _bool_,"Control whether the I/O workload for the backup initial checkpoint will be limited, according to the `checkpoint_completion_target` setting on the PostgreSQL server. If set to true, an immediate checkpoint will be used, meaning PostgreSQL will complete the checkpoint as soon as possible. `false` by default."

PasswordState
-------------

**Appears in:**

- :ref:`ManagedRoles <ManagedRoles>` 

PasswordState represents the state of the password of a managed
RoleConfiguration

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `transactionID` _int64_,the last transaction ID to affect the role definition in PostgreSQL
  `resourceVersion` _string_,the resource version of the password secret

PgBouncerIntegrationStatus
--------------------------

**Appears in:**

- :ref:`PoolerIntegrations <PoolerIntegrations>` 

PgBouncerIntegrationStatus encapsulates the needed integration for the
pgbouncer poolers referencing the cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `secrets` _[]string_,No description provided.

PgBouncerPoolMode
-----------------

(Alias of ``string`` )

**Appears in:**

- :ref:`PgBouncerSpec <PgBouncerSpec>` 

PgBouncerPoolMode is the mode of PgBouncer

PgBouncerSecrets
----------------

**Appears in:**

- :ref:`PoolerSecrets <PoolerSecrets>` 

PgBouncerSecrets contains the versions of the secrets used by pgbouncer

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `authQuery`  :ref:`_SecretVersion_ <#postgresql-k8s-enterprisedb-io-v1-SecretVersion>` ,The auth query secret version

PgBouncerSpec
-------------

**Appears in:**

- :ref:`PoolerSpec <PoolerSpec>` 

PgBouncerSpec defines how to configure PgBouncer

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `poolMode`  :ref:`_PgBouncerPoolMode_ <#postgresql-k8s-enterprisedb-io-v1-PgBouncerPoolMode>` ,The pool mode. Default: `session`.
  `authQuerySecret`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,"The credentials of the user that need to be used for the authentication query. In case it is specified, also an AuthQuery (e.g. ""SELECT usename, passwd FROM pg_catalog.pg_shadow WHERE usename=$1"") has to be specified and no automatic CNP Cluster integration will be triggered."
  `authQuery` _string_,"The query that will be used to download the hash of the password of a certain user. Default: ""SELECT usename, passwd FROM public.user_search($1)"". In case it is specified, also an AuthQuerySecret has to be specified and no automatic CNP Cluster integration will be triggered."
  `parameters` _map[string]string_,Additional parameters to be passed to PgBouncer- please check the CNP documentation for a list of options you can configure
  `pg_hba` _[]string_,PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file)
  `paused` _bool_,"When set to `true`, PgBouncer will disconnect from the PostgreSQL server, first waiting for all queries to complete, and pause all new client connections until this value is set to `false` (default). Internally, the operator calls PgBouncer's `PAUSE` and `RESUME` commands."

PluginConfiguration
-------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

- :ref:`ExternalCluster <ExternalCluster>` 

PluginConfiguration specifies a plugin that need to be loaded for this
cluster to be reconciled

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,Name is the plugin name
  `enabled` _bool_,Enabled is true if this plugin will be used
  `parameters` _map[string]string_,Parameters is the configuration of the plugin

PluginStatus
------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

PluginStatus is the status of a loaded plugin

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,Name is the name of the plugin
  `version`  **[Required]**  _string_,Version is the version of the plugin loaded by the latest reconciliation loop
  `capabilities` _[]string_,Capabilities are the list of capabilities of the plugin
  `operatorCapabilities` _[]string_,OperatorCapabilities are the list of capabilities of the plugin regarding the reconciler
  `walCapabilities` _[]string_,WALCapabilities are the list of capabilities of the plugin regarding the WAL management
  `backupCapabilities` _[]string_,BackupCapabilities are the list of capabilities of the plugin regarding the Backup management
  `restoreJobHookCapabilities` _[]string_,RestoreJobHookCapabilities are the list of capabilities of the plugin regarding the RestoreJobHook management
  `status` _string_,Status contain the status reported by the plugin through the SetStatusInCluster interface

PodTemplateSpec
---------------

**Appears in:**

- :ref:`PoolerSpec <PoolerSpec>` 

PodTemplateSpec is a structure allowing the user to set a template for
Pod generation.

Unfortunately we can’t use the corev1.PodTemplateSpec type because the
generated CRD won’t have the field for the metadata section.

References:
https://github.com/kubernetes-sigs/controller-tools/issues/385
https://github.com/kubernetes-sigs/controller-tools/issues/448
https://github.com/prometheus-operator/prometheus-operator/issues/3041

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `metadata`  :ref:`_Metadata_ <#postgresql-k8s-enterprisedb-io-v1-Metadata>` ,Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  `spec`   `_core/v1.PodSpec_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#podspec-v1-core>`__ ,Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

PodTopologyLabels
-----------------

(Alias of map[string]string)

**Appears in:**

- :ref:`From Replica Clusters to Distributed Topology <From Replica Clusters to Distributed Topology>` 

PodTopologyLabels represent the topology of a Pod.
map[labelName]labelValue

PoolerIntegrations
------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

PoolerIntegrations encapsulates the needed integration for the poolers
referencing the cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `pgBouncerIntegration`  :ref:`_PgBouncerIntegrationStatus_ <#postgresql-k8s-enterprisedb-io-v1-PgBouncerIntegrationStatus>` ,No description provided.

PoolerMonitoringConfiguration
-----------------------------

**Appears in:**

- :ref:`PoolerSpec <PoolerSpec>` 

PoolerMonitoringConfiguration is the type containing all the monitoring
configuration for a certain Pooler.

Mirrors the Cluster’s MonitoringConfiguration but without the custom
queries part for now.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `enablePodMonitor` _bool_,Enable or disable the `PodMonitor`
  `podMonitorMetricRelabelings`  :ref:`CloudNativePG <Monitoring>` ,The list of metric relabelings for the `PodMonitor`. Applied to samples before ingestion.
  `podMonitorRelabelings`  :ref:`CloudNativePG <Monitoring>` ,The list of relabelings for the `PodMonitor`. Applied to samples before scraping.

PoolerSecrets
-------------

**Appears in:**

- :ref:`PoolerStatus <PoolerStatus>` 

PoolerSecrets contains the versions of all the secrets used

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `serverTLS`  :ref:`_SecretVersion_ <#postgresql-k8s-enterprisedb-io-v1-SecretVersion>` ,The server TLS secret version
  `serverCA`  :ref:`_SecretVersion_ <#postgresql-k8s-enterprisedb-io-v1-SecretVersion>` ,The server CA secret version
  `clientCA`  :ref:`_SecretVersion_ <#postgresql-k8s-enterprisedb-io-v1-SecretVersion>` ,The client CA secret version
  `pgBouncerSecrets`  :ref:`_PgBouncerSecrets_ <#postgresql-k8s-enterprisedb-io-v1-PgBouncerSecrets>` ,The version of the secrets used by PgBouncer

PoolerSpec
----------

**Appears in:**

- :ref:`Pooler configuration <Pooler configuration>` 

PoolerSpec defines the desired state of Pooler

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `cluster`  **  `Required]**  [_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,This is the cluster reference on which the Pooler will work. Pooler name should never match with any cluster name within the same namespace.
  `type`  :ref:`_PoolerType_ <#postgresql-k8s-enterprisedb-io-v1-PoolerType>` ,Type of service to forward traffic to. Default: `rw`.
  `instances` _int32_,The number of replicas we want. Default: 1.
  `template`  :ref:`_PodTemplateSpec_ <#postgresql-k8s-enterprisedb-io-v1-PodTemplateSpec>` ,The template of the Pod to be created
  `pgbouncer`  ** :ref:`Required]**  [_PgBouncerSpec_ <#postgresql-k8s-enterprisedb-io-v1-PgBouncerSpec>` ,The PgBouncer configuration
  `deploymentStrategy`   `_apps/v1.DeploymentStrategy_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#deploymentstrategy-v1-apps>`__ ,The deployment strategy to use for pgbouncer to replace existing pods with new ones
  `monitoring`  :ref:`_PoolerMonitoringConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-PoolerMonitoringConfiguration>` ,The configuration of the monitoring infrastructure of this pooler.
  `serviceTemplate`  :ref:`_ServiceTemplateSpec_ <#postgresql-k8s-enterprisedb-io-v1-ServiceTemplateSpec>` ,Template for the Service to be created

PoolerStatus
------------

**Appears in:**

- :ref:`Pooler configuration <Pooler configuration>` 

PoolerStatus defines the observed state of Pooler

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `secrets`  :ref:`_PoolerSecrets_ <#postgresql-k8s-enterprisedb-io-v1-PoolerSecrets>` ,The resource version of the config object
  `instances` _int32_,The number of pods trying to be scheduled

PoolerType
----------

(Alias of ``string`` )

**Appears in:**

- :ref:`PoolerSpec <PoolerSpec>` 

PoolerType is the type of the connection pool, meaning the service we
are targeting. Allowed values are ``rw`` and ``ro`` .

PostgresConfiguration
---------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

PostgresConfiguration defines the PostgreSQL configuration

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `parameters` _map[string]string_,PostgreSQL configuration options (postgresql.conf)
  `synchronous`  :ref:`_SynchronousReplicaConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-SynchronousReplicaConfiguration>` ,Configuration of the PostgreSQL synchronous replication feature
  `pg_hba` _[]string_,PostgreSQL Host Based Authentication rules (lines to be appended to the pg_hba.conf file)
  `pg_ident` _[]string_,PostgreSQL User Name Maps rules (lines to be appended to the pg_ident.conf file)
  `epas`  :ref:`_EPASConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-EPASConfiguration>` ,EDB Postgres Advanced Server specific configurations
  `syncReplicaElectionConstraint`  :ref:`_SyncReplicaElectionConstraints_ <#postgresql-k8s-enterprisedb-io-v1-SyncReplicaElectionConstraints>` ,"Requirements to be met by sync replicas. This will affect how the ""synchronous_standby_names"" parameter will be set up."
  `shared_preload_libraries` _[]string_,Lists of shared preload libraries to add to the default ones
  `ldap`  :ref:`_LDAPConfig_ <#postgresql-k8s-enterprisedb-io-v1-LDAPConfig>` ,Options to specify LDAP configuration
  `promotionTimeout` _int32_,"Specifies the maximum number of seconds to wait when promoting an instance to primary. Default value is 40000000, greater than one year in seconds, big enough to simulate an infinite timeout"
  `enableAlterSystem` _bool_,"If this parameter is true, the user will be able to invoke `ALTER SYSTEM` on this EDB CloudNativePG Cluster Cluster. This should only be used for debugging and troubleshooting. Defaults to false."

PrimaryUpdateMethod
-------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

PrimaryUpdateMethod contains the method to use when upgrading the
primary server of the cluster as part of rolling updates

PrimaryUpdateStrategy
---------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

PrimaryUpdateStrategy contains the strategy to follow when upgrading the
primary server of the cluster as part of rolling updates

Probe
-----

**Appears in:**

- :ref:`ProbesConfiguration <ProbesConfiguration>` 

Probe describes a health check to be performed against a container to
determine whether it is alive or ready to receive traffic.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `initialDelaySeconds` _int32_,Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  `timeoutSeconds` _int32_,Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  `periodSeconds` _int32_,How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
  `successThreshold` _int32_,Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
  `failureThreshold` _int32_,Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
  `terminationGracePeriodSeconds` _int64_,"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset."

ProbesConfiguration
-------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ProbesConfiguration represent the configuration for the probes to be
injected in the PostgreSQL Pods

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `startup`  ** :ref:`Required]**  [_Probe_ <#postgresql-k8s-enterprisedb-io-v1-Probe>` ,The startup probe configuration
  `liveness`  ** :ref:`Required]**  [_Probe_ <#postgresql-k8s-enterprisedb-io-v1-Probe>` ,The liveness probe configuration
  `readiness`  ** :ref:`Required]**  [_Probe_ <#postgresql-k8s-enterprisedb-io-v1-Probe>` ,The readiness probe configuration

PublicationReclaimPolicy
------------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`PublicationSpec <PublicationSpec>` 

PublicationReclaimPolicy defines a policy for end-of-life maintenance of
Publications.

PublicationSpec
---------------

**Appears in:**

- :ref:`Publications <Publications>` 

PublicationSpec defines the desired state of Publication

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `cluster`  **  `Required]**  [_core/v1.LocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core>`__ ,"The name of the PostgreSQL cluster that identifies the ""publisher"""
  `name`  **[Required]**  _string_,The name of the publication inside PostgreSQL
  `dbname`  **[Required]**  _string_,"The name of the database where the publication will be installed in the ""publisher"" cluster"
  `parameters` _map[string]string_,Publication parameters part of the `WITH` clause as expected by PostgreSQL `CREATE PUBLICATION` command
  `target`  ** :ref:`Required]**  [_PublicationTarget_ <#postgresql-k8s-enterprisedb-io-v1-PublicationTarget>` ,Target of the publication as expected by PostgreSQL `CREATE PUBLICATION` command
  `publicationReclaimPolicy`  :ref:`_PublicationReclaimPolicy_ <#postgresql-k8s-enterprisedb-io-v1-PublicationReclaimPolicy>` ,The policy for end-of-life maintenance of this publication

PublicationStatus
-----------------

**Appears in:**

- :ref:`Publications <Publications>` 

PublicationStatus defines the observed state of Publication

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `observedGeneration` _int64_,A sequence number representing the latest desired state that was synchronized
  `applied` _bool_,Applied is true if the publication was reconciled correctly
  `message` _string_,Message is the reconciliation output message

PublicationTarget
-----------------

**Appears in:**

- :ref:`PublicationSpec <PublicationSpec>` 

PublicationTarget is what this publication should publish

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `allTables` _bool_,"Marks the publication as one that replicates changes for all tables in the database, including tables created in the future. Corresponding to `FOR ALL TABLES` in PostgreSQL."
  `objects`  :ref:`_[]PublicationTargetObject_ <#postgresql-k8s-enterprisedb-io-v1-PublicationTargetObject>` ,Just the following schema objects

PublicationTargetObject
-----------------------

**Appears in:**

- :ref:`PublicationTarget <PublicationTarget>` 

PublicationTargetObject is an object to publish

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `tablesInSchema` _string_,"Marks the publication as one that replicates changes for all tables in the specified list of schemas, including tables created in the future. Corresponding to `FOR TABLES IN SCHEMA` in PostgreSQL."
  `table`  :ref:`_PublicationTargetTable_ <#postgresql-k8s-enterprisedb-io-v1-PublicationTargetTable>` ,Specifies a list of tables to add to the publication. Corresponding to `FOR TABLE` in PostgreSQL.

PublicationTargetTable
----------------------

**Appears in:**

- :ref:`PublicationTargetObject <PublicationTargetObject>` 

PublicationTargetTable is a table to publish

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `only` _bool_,Whether to limit to the table only or include all its descendants
  `name`  **[Required]**  _string_,The table name
  `schema` _string_,The schema name
  `columns` _[]string_,The columns to publish

RecoveryTarget
--------------

**Appears in:**

- :ref:`BootstrapRecovery <BootstrapRecovery>` 

RecoveryTarget allows to configure the moment where the recovery process
will stop. All the target options except TargetTLI are mutually
exclusive.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `backupID` _string_,The ID of the backup from which to start the recovery process. If empty (default) the operator will automatically detect the backup based on targetTime or targetLSN if specified. Otherwise use the latest available backup in chronological order.
  `targetTLI` _string_,"The target timeline (""latest"" or a positive integer)"
  `targetXID` _string_,The target transaction ID
  `targetName` _string_,The target name (to be previously created with `pg_create_restore_point`)
  `targetLSN` _string_,The target LSN (Log Sequence Number)
  `targetTime` _string_,The target time as a timestamp in the RFC3339 standard
  `targetImmediate` _bool_,End recovery as soon as a consistent state is reached
  `exclusive` _bool_,"Set the target to be exclusive. If omitted, defaults to false, so that in Postgres, `recovery_target_inclusive` will be true"

ReplicaClusterConfiguration
---------------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ReplicaClusterConfiguration encapsulates the configuration of a replica
cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `self` _string_,"Self defines the name of this cluster. It is used to determine if this is a primary or a replica cluster, comparing it with `primary`"
  `primary` _string_,"Primary defines which Cluster is defined to be the primary in the distributed PostgreSQL cluster, based on the topology specified in externalClusters"
  `source`  **[Required]**  _string_,The name of the external cluster which is the replication origin
  `enabled` _bool_,"If replica mode is enabled, this cluster will be a replica of an existing cluster. Replica cluster can be created from a recovery object store or via streaming through pg_basebackup. Refer to the Replica clusters page of the documentation for more information."
  `promotionToken` _string_,A demotion token generated by an external cluster used to check if the promotion requirements are met.
  `minApplyDelay`   `_meta/v1.Duration_ <https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration>`__ ,"When replica mode is enabled, this parameter allows you to replay transactions only when the system time is at least the configured time past the commit time. This provides an opportunity to correct data loss errors. Note that when this parameter is set, a promotion token cannot be used."

ReplicationSlotsConfiguration
-----------------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ReplicationSlotsConfiguration encapsulates the configuration of
replication slots

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `highAvailability`  :ref:`_ReplicationSlotsHAConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-ReplicationSlotsHAConfiguration>` ,Replication slots for high availability configuration
  `updateInterval` _int_,Standby will update the status of the local replication slots every `updateInterval` seconds (default 30).
  `synchronizeReplicas`  :ref:`_SynchronizeReplicasConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-SynchronizeReplicasConfiguration>` ,Configures the synchronization of the user defined physical replication slots

ReplicationSlotsHAConfiguration
-------------------------------

**Appears in:**

- :ref:`ReplicationSlotsConfiguration <ReplicationSlotsConfiguration>` 

ReplicationSlotsHAConfiguration encapsulates the configuration of the
replication slots that are automatically managed by the operator to
control the streaming replication connections with the standby instances
for high availability (HA) purposes. Replication slots are a PostgreSQL
feature that makes sure that PostgreSQL automatically keeps WAL files in
the primary when a streaming client (in this specific case a replica
that is part of the HA cluster) gets disconnected.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `enabled` _bool_,"If enabled (default), the operator will automatically manage replication slots on the primary instance and use them in streaming replication connections with all the standby instances that are part of the HA cluster. If disabled, the operator will not take advantage of replication slots in streaming connections with the replicas. This feature also controls replication slots in replica cluster, from the designated primary to its cascading replicas."
  `slotPrefix` _string_,"Prefix for replication slots managed by the operator for HA. It may only contain lower case letters, numbers, and the underscore character. This can only be set at creation time. By default set to `_cnp_`."

RoleConfiguration
-----------------

**Appears in:**

- :ref:`ManagedConfiguration <ManagedConfiguration>` 

RoleConfiguration is the representation, in Kubernetes, of a PostgreSQL
role with the additional field Ensure specifying whether to ensure the
presence or absence of the role in the database

The defaults of the CREATE ROLE command are applied Reference:
https://www.postgresql.org/docs/current/sql-createrole.html

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,Name of the role
  `comment` _string_,Description of the role
  `ensure`  :ref:`_EnsureOption_ <#postgresql-k8s-enterprisedb-io-v1-EnsureOption>` ,"Ensure the role is `present` or `absent`- defaults to ""present"""
  `passwordSecret`   `_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,"Secret containing the password of the role (if present) If null, the password will be ignored unless DisablePassword is set"
  `connectionLimit` _int64_,"If the role can log in, this specifies how many concurrent connections the role can make. `-1` (the default) means no limit."
  `validUntil`   `_meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,"Date and time after which the role's password is no longer valid. When omitted, the password will never expire (default)."
  `inRoles` _[]string_,List of one or more existing roles to which this role will be immediately added as a new member. Default empty.
  `inherit` _bool_,"Whether a role ""inherits"" the privileges of roles it is a member of. Defaults is `true`."
  `disablePassword` _bool_,DisablePassword indicates that a role's password should be set to NULL in Postgres
  `superuser` _bool_,Whether the role is a `superuser` who can override all access restrictions within the database- superuser status is dangerous and should be used only when really needed. You must yourself be a superuser to create a new superuser. Defaults is `false`.
  `createdb` _bool_,"When set to `true`, the role being defined will be allowed to create new databases. Specifying `false` (default) will deny a role the ability to create databases."
  `createrole` _bool_,"Whether the role will be permitted to create, alter, drop, comment on, change the security label for, and grant or revoke membership in other roles. Default is `false`."
  `login` _bool_,"Whether the role is allowed to log in. A role having the `login` attribute can be thought of as a user. Roles without this attribute are useful for managing database privileges, but are not users in the usual sense of the word. Default is `false`."
  `replication` _bool_,"Whether a role is a replication role. A role must have this attribute (or be a superuser) in order to be able to connect to the server in replication mode (physical or logical replication) and in order to be able to create or drop replication slots. A role having the `replication` attribute is a very highly privileged role, and should only be used on roles actually used for replication. Default is `false`."
  `bypassrls` _bool_,Whether a role bypasses every row-level security (RLS) policy. Default is `false`.

SQLRefs
-------

**Appears in:**

- :ref:`BootstrapInitDB <BootstrapInitDB>` 

SQLRefs holds references to ConfigMaps or Secrets containing SQL files.
The references are processed in a specific order: first, all Secrets are
processed, followed by all ConfigMaps. Within each group, the processing
order follows the sequence specified in their respective arrays.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `secretRefs`   `_[]github.com/cloudnative-pg/machinery/pkg/api.SecretKeySelector_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#SecretKeySelector>`__ ,SecretRefs holds a list of references to Secrets
  `configMapRefs`   `_[]github.com/cloudnative-pg/machinery/pkg/api.ConfigMapKeySelector_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#ConfigMapKeySelector>`__ ,ConfigMapRefs holds a list of references to ConfigMaps

ScheduledBackupSpec
-------------------

**Appears in:**

- :ref:`ScheduledBackup <ScheduledBackup>` 

ScheduledBackupSpec defines the desired state of ScheduledBackup

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `suspend` _bool_,If this backup is suspended or not
  `immediate` _bool_,If the first backup has to be immediately start after creation or not
  `schedule`  **[Required]**  _string_,"The schedule does not follow the same format used in Kubernetes CronJobs as it includes an additional seconds specifier, see https://pkg.go.dev/github.com/robfig/cron#hdr-CRON\_Expression\_Format"
  `cluster`  **  `Required]**  [_github.com/cloudnative-pg/machinery/pkg/api.LocalObjectReference_ <https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#LocalObjectReference>`__ ,The cluster to backup
  `backupOwnerReference` _string_,Indicates which ownerReference should be put inside the created backup resources. _ none: no owner reference for created backup objects (same behavior as before the field was introduced) _ self: sets the Scheduled backup object as owner of the backup \* cluster: set the cluster as owner of the backup
  `target`  :ref:`_BackupTarget_ <#postgresql-k8s-enterprisedb-io-v1-BackupTarget>` ,"The policy to decide which instance should perform this backup. If empty, it defaults to `cluster.spec.backup.target`. Available options are empty string, `primary` and `prefer-standby`. `primary` to have backups run always on primary instances, `prefer-standby` to have backups run preferably on the most updated standby, if available."
  `method`  :ref:`_BackupMethod_ <#postgresql-k8s-enterprisedb-io-v1-BackupMethod>` ,"The backup method to be used, possible options are `barmanObjectStore`, `volumeSnapshot` or `plugin`. Defaults to: `barmanObjectStore`."
  `pluginConfiguration`  :ref:`_BackupPluginConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-BackupPluginConfiguration>` ,Configuration parameters passed to the plugin managing this backup
  `online` _bool_,"Whether the default type of backup with volume snapshots is online/hot (`true`, default) or offline/cold (`false`) Overrides the default setting specified in the cluster field '.spec.backup.volumeSnapshot.online'"
  `onlineConfiguration`  :ref:`_OnlineConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-OnlineConfiguration>` ,Configuration parameters to control the online/hot backup with volume snapshots Overrides the default settings specified in the cluster '.backup.volumeSnapshot.onlineConfiguration' stanza

ScheduledBackupStatus
---------------------

**Appears in:**

- :ref:`ScheduledBackup <ScheduledBackup>` 

ScheduledBackupStatus defines the observed state of ScheduledBackup

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `lastCheckTime`   `_meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,The latest time the schedule
  `lastScheduleTime`   `_meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,Information when was the last time that backup was successfully scheduled.
  `nextScheduleTime`   `_meta/v1.Time_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta>`__ ,Next time we will run a backup

SecretVersion
-------------

**Appears in:**

- :ref:`PgBouncerSecrets <PgBouncerSecrets>` 

- :ref:`PoolerSecrets <PoolerSecrets>` 

SecretVersion contains a secret name and its ResourceVersion

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name` _string_,The name of the secret
  `version` _string_,The ResourceVersion of the secret

SecretsResourceVersion
----------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

SecretsResourceVersion is the resource versions of the secrets managed
by the operator

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `superuserSecretVersion` _string_,"The resource version of the ""postgres"" user secret"
  `replicationSecretVersion` _string_,"The resource version of the ""streaming_replica"" user secret"
  `applicationSecretVersion` _string_,"The resource version of the ""app"" user secret"
  `managedRoleSecretVersion` _map[string]string_,The resource versions of the managed roles secrets
  `caSecretVersion` _string_,Unused. Retained for compatibility with old versions.
  `clientCaSecretVersion` _string_,The resource version of the PostgreSQL client-side CA secret version
  `serverCaSecretVersion` _string_,The resource version of the PostgreSQL server-side CA secret version
  `serverSecretVersion` _string_,The resource version of the PostgreSQL server-side secret version
  `barmanEndpointCA` _string_,The resource version of the Barman Endpoint CA if provided
  `externalClusterSecretVersion` _map[string]string_,The resource versions of the external cluster secrets
  `metrics` _map[string]string_,"A map with the versions of all the secrets used to pass metrics. Map keys are the secret names, map values are the versions"

ServiceAccountTemplate
----------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

ServiceAccountTemplate contains the template needed to generate the
service accounts

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `metadata`  ** :ref:`Required]**  [_Metadata_ <#postgresql-k8s-enterprisedb-io-v1-Metadata>` ,Metadata are the metadata to be used for the generated service account

ServiceSelectorType
-------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`ManagedService <ManagedService>` 

- :ref:`ManagedServices <ManagedServices>` 

ServiceSelectorType describes a valid value for generating the service
selectors. It indicates which type of service the selector applies to,
such as read-write, read, or read-only

ServiceTemplateSpec
-------------------

**Appears in:**

- :ref:`ManagedService <ManagedService>` 

- :ref:`PoolerSpec <PoolerSpec>` 

ServiceTemplateSpec is a structure allowing the user to set a template
for Service generation.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `metadata`  :ref:`_Metadata_ <#postgresql-k8s-enterprisedb-io-v1-Metadata>` ,Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  `spec`   `_core/v1.ServiceSpec_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#servicespec-v1-core>`__ ,Specification of the desired behavior of the service. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

ServiceUpdateStrategy
---------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`ManagedService <ManagedService>` 

ServiceUpdateStrategy describes how the changes to the managed service
should be handled

SnapshotOwnerReference
----------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`VolumeSnapshotConfiguration <VolumeSnapshotConfiguration>` 

SnapshotOwnerReference defines the reference type for the owner of the
snapshot. This specifies which owner the processed resources should
relate to.

SnapshotType
------------

(Alias of ``string`` )

**Appears in:**

- :ref:`Important OpenShift concepts <Important OpenShift concepts>` 

SnapshotType is a type of allowed import

StorageConfiguration
--------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

- :ref:`TablespaceConfiguration <TablespaceConfiguration>` 

StorageConfiguration is the configuration used to create and reconcile
PVCs, usable for WAL volumes, PGDATA volumes, or tablespaces

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `storageClass` _string_,"StorageClass to use for PVCs. Applied after evaluating the PVC template, if available. If not specified, the generated PVCs will use the default storage class"
  `size` _string_,Size of the storage. Required if not already specified in the PVC template. Changes to this field are automatically reapplied to the created PVCs. Size cannot be decreased.
  `resizeInUseVolumes` _bool_,"Resize existent PVCs, defaults to true"
  `pvcTemplate`   `_core/v1.PersistentVolumeClaimSpec_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#persistentvolumeclaimspec-v1-core>`__ ,Template to be used to generate the Persistent Volume Claim

SubscriptionReclaimPolicy
-------------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`SubscriptionSpec <SubscriptionSpec>` 

SubscriptionReclaimPolicy describes a policy for end-of-life maintenance
of Subscriptions.

SubscriptionSpec
----------------

**Appears in:**

- :ref:`Subscriptions <Subscriptions>` 

SubscriptionSpec defines the desired state of Subscription

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `cluster`  **  `Required]**  [_core/v1.LocalObjectReference_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core>`__ ,"The name of the PostgreSQL cluster that identifies the ""subscriber"""
  `name`  **[Required]**  _string_,The name of the subscription inside PostgreSQL
  `dbname`  **[Required]**  _string_,"The name of the database where the publication will be installed in the ""subscriber"" cluster"
  `parameters` _map[string]string_,Subscription parameters part of the `WITH` clause as expected by PostgreSQL `CREATE SUBSCRIPTION` command
  `publicationName`  **[Required]**  _string_,"The name of the publication inside the PostgreSQL database in the ""publisher"""
  `publicationDBName` _string_,The name of the database containing the publication on the external cluster. Defaults to the one in the external cluster definition.
  `externalClusterName`  **[Required]**  _string_,"The name of the external cluster with the publication (""publisher"")"
  `subscriptionReclaimPolicy`  :ref:`_SubscriptionReclaimPolicy_ <#postgresql-k8s-enterprisedb-io-v1-SubscriptionReclaimPolicy>` ,The policy for end-of-life maintenance of this subscription

SubscriptionStatus
------------------

**Appears in:**

- :ref:`Subscriptions <Subscriptions>` 

SubscriptionStatus defines the observed state of Subscription

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `observedGeneration` _int64_,A sequence number representing the latest desired state that was synchronized
  `applied` _bool_,Applied is true if the subscription was reconciled correctly
  `message` _string_,Message is the reconciliation output message

SwitchReplicaClusterStatus
--------------------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

SwitchReplicaClusterStatus contains all the statuses regarding the
switch of a cluster to a replica cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `inProgress` _bool_,InProgress indicates if there is an ongoing procedure of switching a cluster to a replica cluster.

SyncReplicaElectionConstraints
------------------------------

**Appears in:**

- :ref:`PostgresConfiguration <PostgresConfiguration>` 

SyncReplicaElectionConstraints contains the constraints for sync
replicas election.

For anti-affinity parameters two instances are considered in the same
location if all the labels values match.

In future synchronous replica election restriction by name will be
supported.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `nodeLabelsAntiAffinity` _[]string_,A list of node labels values to extract and compare to evaluate if the pods reside in the same topology or not
  `enabled`  **[Required]**  _bool_,This flag enables the constraints for sync replicas

SynchronizeReplicasConfiguration
--------------------------------

**Appears in:**

- :ref:`ReplicationSlotsConfiguration <ReplicationSlotsConfiguration>` 

SynchronizeReplicasConfiguration contains the configuration for the
synchronization of user defined physical replication slots

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `enabled`  **[Required]**  _bool_,"When set to true, every replication slot that is on the primary is synchronized on each standby"
  `excludePatterns` _[]string_,List of regular expression patterns to match the names of replication slots to be excluded (by default empty)

SynchronousReplicaConfiguration
-------------------------------

**Appears in:**

- :ref:`PostgresConfiguration <PostgresConfiguration>` 

SynchronousReplicaConfiguration contains the configuration of the
PostgreSQL synchronous replication feature. Important: at this moment,
also ``.spec.minSyncReplicas`` and ``.spec.maxSyncReplicas`` need to be
considered.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `method`  ** :ref:`Required]**  [_SynchronousReplicaConfigurationMethod_ <#postgresql-k8s-enterprisedb-io-v1-SynchronousReplicaConfigurationMethod>` ,"Method to select synchronous replication standbys from the listed servers, accepting 'any' (quorum-based synchronous replication) or 'first' (priority-based synchronous replication) as values."
  `number`  **[Required]**  _int_,Specifies the number of synchronous standby servers that transactions must wait for responses from.
  `maxStandbyNamesFromCluster` _int_,Specifies the maximum number of local cluster pods that can be automatically included in the `synchronous_standby_names` option in PostgreSQL.
  `standbyNamesPre` _[]string_,A user-defined list of application names to be added to `synchronous_standby_names` before local cluster pods (the order is only useful for priority-based synchronous replication).
  `standbyNamesPost` _[]string_,A user-defined list of application names to be added to `synchronous_standby_names` after local cluster pods (the order is only useful for priority-based synchronous replication).
  `dataDurability`  :ref:`_DataDurabilityLevel_ <#postgresql-k8s-enterprisedb-io-v1-DataDurabilityLevel>` ,"If set to ""required"", data durability is strictly enforced. Write operations with synchronous commit settings (`on`, `remote_write`, or `remote_apply`) will block if there are insufficient healthy replicas, ensuring data persistence. If set to ""preferred"", data durability is maintained when healthy replicas are available, but the required number of instances will adjust dynamically if replicas become unavailable. This setting relaxes strict durability enforcement to allow for operational continuity. This setting is only applicable if both `standbyNamesPre` and `standbyNamesPost` are unset (empty)."

SynchronousReplicaConfigurationMethod
-------------------------------------

(Alias of ``string`` )

**Appears in:**

- :ref:`SynchronousReplicaConfiguration <SynchronousReplicaConfiguration>` 

SynchronousReplicaConfigurationMethod configures whether to use quorum
based replication or a priority list

TDEConfiguration
----------------

**Appears in:**

- :ref:`EPASConfiguration <EPASConfiguration>` 

TDEConfiguration contains the Transparent Data Encryption configuration

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `enabled` _bool_,True if we want to have TDE enabled
  `secretKeyRef`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,Reference to the secret that contains the encryption key
  `wrapCommand`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,WrapCommand is the encrypt command provided by the user
  `unwrapCommand`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,UnwrapCommand is the decryption command provided by the user
  `passphraseCommand`   `_core/v1.SecretKeySelector_ <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core>`__ ,PassphraseCommand is the command executed to get the passphrase that will be passed to the OpenSSL command to encrypt and decrypt

TablespaceConfiguration
-----------------------

**Appears in:**

- :ref:`ClusterSpec <ClusterSpec>` 

TablespaceConfiguration is the configuration of a tablespace, and
includes the storage specification for the tablespace

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,The name of the tablespace
  `storage`  ** :ref:`Required]**  [_StorageConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-StorageConfiguration>` ,The storage configuration for the tablespace
  `owner`  :ref:`_DatabaseRoleRef_ <#postgresql-k8s-enterprisedb-io-v1-DatabaseRoleRef>` ,Owner is the PostgreSQL user owning the tablespace
  `temporary` _bool_,"When set to true, the tablespace will be added as a `temp_tablespaces` entry in PostgreSQL, and will be available to automatically house temp database objects, or other temporary files. Please refer to PostgreSQL documentation for more information on the `temp_tablespaces` GUC."

TablespaceState
---------------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

TablespaceState represents the state of a tablespace in a cluster

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `name`  **[Required]**  _string_,Name is the name of the tablespace
  `owner` _string_,Owner is the PostgreSQL user owning the tablespace
  `state`  ** :ref:`Required]**  [_TablespaceStatus_ <#postgresql-k8s-enterprisedb-io-v1-TablespaceStatus>` ,State is the latest reconciliation state
  `error` _string_,"Error is the reconciliation error, if any"

TablespaceStatus
----------------

(Alias of ``string`` )

**Appears in:**

- :ref:`TablespaceState <TablespaceState>` 

TablespaceStatus represents the status of a tablespace in the cluster

Topology
--------

**Appears in:**

- :ref:`ClusterStatus <ClusterStatus>` 

Topology contains the cluster topology

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `instances`  :ref:`_map[PodName]PodTopologyLabels_ <#postgresql-k8s-enterprisedb-io-v1-PodTopologyLabels>` ,Instances contains the pod topology of the instances
  `nodesUsed` _int32_,"NodesUsed represents the count of distinct nodes accommodating the instances. A value of '1' suggests that all instances are hosted on a single node, implying the absence of High Availability (HA). Ideally, this value should be the same as the number of instances in the Postgres HA cluster, implying shared nothing architecture on the compute side."
  `successfullyExtracted` _bool_,SuccessfullyExtracted indicates if the topology data was extract. It is useful to enact fallback behaviors in synchronous replica election in case of failures

VolumeSnapshotConfiguration
---------------------------

**Appears in:**

- :ref:`BackupConfiguration <BackupConfiguration>` 

VolumeSnapshotConfiguration represents the configuration for the
execution of snapshot backups.

.. csv-table::
  :header: Field,Description
  :widths: 15,25
  :align: left
  :class: longtable

  `labels` _map[string]string_,Labels are key-value pairs that will be added to .metadata.labels snapshot resources.
  `annotations` _map[string]string_,Annotations key-value pairs that will be added to .metadata.annotations snapshot resources.
  `className` _string_,ClassName specifies the Snapshot Class to be used for PG_DATA PersistentVolumeClaim. It is the default class for the other types if no specific class is present
  `walClassName` _string_,WalClassName specifies the Snapshot Class to be used for the PG_WAL PersistentVolumeClaim.
  `tablespaceClassName` _map[string]string_,"TablespaceClassName specifies the Snapshot Class to be used for the tablespaces. defaults to the PGDATA Snapshot Class, if set"
  `snapshotOwnerReference`  :ref:`_SnapshotOwnerReference_ <#postgresql-k8s-enterprisedb-io-v1-SnapshotOwnerReference>` ,SnapshotOwnerReference indicates the type of owner reference the snapshot should have
  `online` _bool_,"Whether the default type of backup with volume snapshots is online/hot (`true`, default) or offline/cold (`false`)"
  `onlineConfiguration`  :ref:`_OnlineConfiguration_ <#postgresql-k8s-enterprisedb-io-v1-OnlineConfiguration>` ,Configuration parameters to control the online/hot backup with volume snapshots

.. toctree::
  :maxdepth: 3

  Reference--pg4k.v1--v1.25.0
  Reference--pg4k.v1--v1.24.1
