Skip to content

Commit 688641a

Browse files
committed
docs: import CloudNativePG main
1 parent 925a8ad commit 688641a

10 files changed

Lines changed: 115 additions & 20 deletions

File tree

website/docs/appendixes/object_stores.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ You can also use any compatible implementation of the supported services.
2727
The required setup depends on the chosen storage provider and is
2828
discussed in the following sections.
2929

30+
:::note Authentication Methods
31+
CloudNativePG does not independently test all authentication methods
32+
supported by `barman-cloud`. CloudNativePG's responsibility is limited to passing
33+
the provided credentials to `barman-cloud`, which then handles authentication
34+
according to its own implementation. Users should refer to the
35+
[Barman Cloud documentation](https://docs.pgbarman.org/release/latest/) to
36+
verify that their chosen authentication method is supported and properly
37+
configured.
38+
:::
39+
3040
## AWS S3
3141

3242
[AWS Simple Storage Service (S3)](https://aws.amazon.com/s3/) is
@@ -195,17 +205,15 @@ spec:
195205
[Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) is the
196206
object storage service provided by Microsoft.
197207

198-
In order to access your storage account for backup and recovery of
199-
CloudNativePG managed databases, you will need one of the following
200-
combinations of credentials:
208+
CloudNativePG supports the following authentication methods for Azure Blob Storage:
201209

202210
- [Connection String](https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#configure-a-connection-string-for-an-azure-storage-account)
203-
- Storage account name and [Storage account access key](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage)
204-
- Storage account name and [Storage account SAS Token](https://docs.microsoft.com/en-us/azure/storage/blobs/sas-service-create)
205-
- Storage account name and [Azure AD Workload Identity](https://azure.github.io/azure-workload-identity/docs/introduction.html)
206-
properly configured.
211+
- Storage Account Name + [Storage Account Access Key](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage)
212+
- Storage Account Name + [Storage Account SAS Token](https://docs.microsoft.com/en-us/azure/storage/blobs/sas-service-create)
213+
- [Azure AD Managed Identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview)
214+
- [Default Azure Credentials](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python)
207215

208-
Using **Azure AD Workload Identity**, you can avoid saving the credentials into a Kubernetes Secret,
216+
Using **Azure AD Managed Identity**, you can avoid saving the credentials into a Kubernetes Secret,
209217
and have a Cluster configuration adding the `inheritFromAzureAD` as follows:
210218

211219
```yaml
@@ -220,6 +228,23 @@ spec:
220228
inheritFromAzureAD: true
221229
```
222230

231+
Alternatively, you can use the **Default Azure Credentials** authentication mechanism, which provides
232+
a seamless authentication experience by supporting multiple authentication methods including environment
233+
variables, managed identities, and Azure CLI credentials. Add the `useDefaultAzureCredentials` flag
234+
as follows:
235+
236+
```yaml
237+
apiVersion: postgresql.cnpg.io/v1
238+
kind: Cluster
239+
[...]
240+
spec:
241+
backup:
242+
barmanObjectStore:
243+
destinationPath: "<destination path here>"
244+
azureCredentials:
245+
useDefaultAzureCredentials: true
246+
```
247+
223248
On the other side, using both **Storage account access key** or **Storage account SAS Token**,
224249
the credentials need to be stored inside a Kubernetes Secret, adding data entries only when
225250
needed. The following command performs that:

website/docs/cloudnative-pg.v1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,7 @@ _Appears in:_
12391239
| --- | --- | --- | --- | --- |
12401240
| `podName` _string_ | The pod name | | | |
12411241
| `ContainerID` _string_ | The container ID | | | |
1242+
| `sessionID` _string_ | The instance manager session ID. This is a unique identifier generated at instance manager<br />startup and changes on every restart (including container reboots). Used to detect if<br />the instance manager was restarted during long-running operations like backups, which<br />would terminate any running backup process. | | | |
12421243

12431244

12441245
#### InstanceReportedState

website/docs/cnpg_i.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ must include this DNS name in its Subject Alternative Names (SAN).
200200

201201
To enable a plugin, configure the `.spec.plugins` section in your `Cluster`
202202
resource. Refer to the CloudNativePG API Reference for the full
203-
[PluginConfiguration](https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PluginConfiguration)
203+
[PluginConfiguration](https://cloudnative-pg.io/docs/devel/cloudnative-pg.v1/#pluginconfiguration)
204204
specification.
205205

206206
Example:

website/docs/connection_pooling.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,10 @@ spec:
666666

667667
### Deprecation of Automatic `PodMonitor` Creation
668668

669-
!!!warning "Feature Deprecation Notice"
669+
:::warning[Feature Deprecation Notice]
670670
The `.spec.monitoring.enablePodMonitor` field in the `Pooler` resource is
671671
now deprecated and will be removed in a future version of the operator.
672+
:::
672673

673674
If you are currently using this feature, we strongly recommend you either
674675
remove or set `.spec.monitoring.enablePodMonitor` to `false` and manually

website/docs/monitoring.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ spec:
118118

119119
#### Deprecation of Automatic `PodMonitor` Creation
120120

121-
!!!warning "Feature Deprecation Notice"
121+
:::warning[Feature Deprecation Notice]
122122
The `.spec.monitoring.enablePodMonitor` field in the `Cluster` resource is
123123
now deprecated and will be removed in a future version of the operator.
124+
:::
124125

125126
If you are currently using this feature, we strongly recommend you either
126127
remove or set `.spec.monitoring.enablePodMonitor` to `false` and manually

website/docs/operator_conf.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ Name | Description
4848
`CERTIFICATE_DURATION` | Determines the lifetime of the generated certificates in days. Default is 90.
4949
`CLUSTERS_ROLLOUT_DELAY` | The duration (in seconds) to wait between the roll-outs of different clusters during an operator upgrade. This setting controls the timing of upgrades across clusters, spreading them out to reduce system impact. The default value is `0` which means no delay between PostgreSQL cluster upgrades.
5050
`CREATE_ANY_SERVICE` | When set to `true`, will create `-any` service for the cluster. Default is `false`
51+
`DRAIN_TAINTS` | Specifies the taint keys that should be interpreted as indicators of node drain. By default, it includes the taints commonly applied by [kubectl](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), [Cluster Autoscaler](https://github.com/kubernetes/autoscaler), and [Karpenter](https://github.com/aws/karpenter-provider-aws): `node.kubernetes.io/unschedulable`, `ToBeDeletedByClusterAutoscaler`, `karpenter.sh/disrupted`, `karpenter.sh/disruption`.
5152
`ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES` | When set to `true`, enables in-place updates of the instance manager after an update of the operator, avoiding rolling updates of the cluster (default `false`)
52-
`EXPIRING_CHECK_THRESHOLD` | Determines the threshold, in days, for identifying a certificate as expiring. Default is 7.
53+
`EXPIRING_CHECK_THRESHOLD` | Determines the threshold, in days, for identifying a certificate as expiring. Default is 7.
5354
`INCLUDE_PLUGINS` | A comma-separated list of plugins to be always included in the Cluster's reconciliation.
5455
`INHERITED_ANNOTATIONS` | List of annotation names that, when defined in a `Cluster` metadata, will be inherited by all the generated resources, including pods
5556
`INHERITED_LABELS` | List of label names that, when defined in a `Cluster` metadata, will be inherited by all the generated resources, including pods
@@ -63,7 +64,7 @@ Name | Description
6364
`POSTGRES_IMAGE_NAME` | The name of the PostgreSQL image used by default for new clusters. Defaults to the version specified in the operator.
6465
`PULL_SECRET_NAME` | Name of an additional pull secret to be defined in the operator's namespace and to be used to download images
6566
`STANDBY_TCP_USER_TIMEOUT` | Defines the [`TCP_USER_TIMEOUT` socket option](https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-TCP-USER-TIMEOUT) in milliseconds for replication connections from standby instances to the primary. Default is 5000 (5 seconds). Set to `0` to use the system's default.
66-
`DRAIN_TAINTS` | Specifies the taint keys that should be interpreted as indicators of node drain. By default, it includes the taints commonly applied by [kubectl](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), [Cluster Autoscaler](https://github.com/kubernetes/autoscaler), and [Karpenter](https://github.com/aws/karpenter-provider-aws): `node.kubernetes.io/unschedulable`, `ToBeDeletedByClusterAutoscaler`, `karpenter.sh/disrupted`, `karpenter.sh/disruption`.
67+
`WATCH_NAMESPACE` | Specifies the namespace(s) where the operator should watch for resources. Multiple namespaces can be specified separated by commas. If not set, the operator watches all namespaces (cluster-wide mode).
6768

6869
Values in `INHERITED_ANNOTATIONS` and `INHERITED_LABELS` support path-like wildcards. For example, the value `example.com/*` will match
6970
both the value `example.com/one` and `example.com/two`.

website/docs/postgres_upgrades.md

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,10 @@ If the upgrade is successful, CloudNativePG:
135135
:::warning
136136
Re-cloning replicas can be time-consuming, especially for very large
137137
databases. Plan accordingly to accommodate potential delays. After completing
138-
the upgrade, it is strongly recommended to take a full backup. Existing backup
139-
data (namely base backups and WAL files) is only available for the previous
140-
minor PostgreSQL release.
138+
the upgrade, take a new base backup as soon as possible. Pre-upgrade backups
139+
and WAL files cannot be used for point-in-time recovery (PITR) across major
140+
version boundaries. See [Backup and WAL Archive Considerations](#backup-and-wal-archive-considerations)
141+
for more details.
141142
:::
142143

143144
:::warning
@@ -156,6 +157,71 @@ automatically decide the rollback.
156157
Ensure you monitor the process closely and take corrective action if needed.
157158
:::
158159

160+
### Backup and WAL Archive Considerations
161+
162+
When performing a major upgrade, `pg_upgrade` creates a new database system
163+
with a new *System ID* and resets the PostgreSQL timeline to 1. This has
164+
implications for backup and WAL archiving:
165+
166+
- **Timeline file conflicts**: New timeline 1 files may overwrite timeline 1
167+
files from the original cluster.
168+
- **Mixed version archives**: Without intervention, the archive will contain
169+
WAL files and backups from both PostgreSQL versions.
170+
171+
:::warning
172+
Point-in-time recovery (PITR) is not supported across major PostgreSQL version
173+
boundaries. You cannot use pre-upgrade backups to recover to a point in time
174+
after the upgrade. Take a new base backup as soon as possible after upgrading
175+
to establish a recovery baseline for the new major version.
176+
:::
177+
178+
How backup systems handle major upgrades depends on the plugin implementation.
179+
Some plugins may automatically manage archive separation during upgrades, while
180+
others require manual configuration to use different archive paths for each
181+
major version. Consult your backup plugin documentation for its specific
182+
behavior during major upgrades.
183+
184+
#### Example: Manual archive path separation with the Barman Cloud plugin
185+
186+
The Barman Cloud plugin does not automatically separate archives during major
187+
upgrades. To preserve pre-upgrade backups and keep archives clean, change the
188+
`serverName` parameter when you trigger the upgrade.
189+
190+
Before upgrade (PostgreSQL 16):
191+
192+
```yaml
193+
spec:
194+
imageName: ghcr.io/cloudnative-pg/postgresql:16-minimal-trixie
195+
plugins:
196+
- name: plugin-barman-cloud
197+
enabled: true
198+
parameters:
199+
destinationPath: s3://my-bucket/
200+
serverName: cluster-example-pg16
201+
```
202+
203+
To trigger the upgrade, change both `imageName` and `serverName` together:
204+
205+
```yaml
206+
spec:
207+
imageName: ghcr.io/cloudnative-pg/postgresql:17-minimal-trixie
208+
plugins:
209+
- name: plugin-barman-cloud
210+
enabled: true
211+
parameters:
212+
destinationPath: s3://my-bucket/
213+
serverName: cluster-example-pg17
214+
```
215+
216+
With this configuration, the old archive at `cluster-example-pg16` remains
217+
intact for pre-upgrade recovery, while the upgraded cluster writes to
218+
`cluster-example-pg17`.
219+
220+
:::info
221+
The deprecated in-tree `barmanObjectStore` implementation also requires manual
222+
`serverName` changes to separate archives during major upgrades.
223+
:::
224+
159225
### Example: Performing a Major Upgrade
160226

161227
Consider the following PostgreSQL cluster running version 16:

website/docs/release_notes/old/v1.18.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Fixes:
6868
CloudNativePG is dropping support for PostgreSQL 10, as PostgreSQL 10
6969
reached End-of-Life (EOL) in November 2022. Versions 11 and newer are
7070
supported. Please plan your migration to PostgreSQL 15 as soon as possible.
71-
Refer to ["Importing Postgres databases"](https://cloudnative-pg.io/documentation/current/database_import/)
71+
Refer to ["Importing Postgres databases"](https://cloudnative-pg.io/docs/devel/database_import/)
7272
for more information on PostgreSQL major offline upgrades.
7373
:::
7474

website/docs/release_notes/old/v1.19.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Important announcements:
292292
- PostgreSQL version 10 is no longer supported as it has reached its EOL.
293293
Versions 11 and newer are supported. Please plan your migration to
294294
PostgreSQL 15 as soon as possible. Refer to
295-
["Importing Postgres databases"](https://cloudnative-pg.io/documentation/current/database_import/)
295+
["Importing Postgres databases"](https://cloudnative-pg.io/docs/devel/database_import/)
296296
for more information on PostgreSQL major offline upgrades.
297297

298298
Features:

website/docs/samples/k9s/plugins.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Move/add to $XDG_CONFIG_HOME/k9s/plugins.yaml
2-
# Requires the cnpg kubectl plugin. See https://cloudnative-pg.io/documentation/current/kubectl-plugin/
2+
# Requires the cnpg kubectl plugin. See https://cloudnative-pg.io/docs/devel/kubectl-plugin/
33
#
44
# Cluster actions:
55
# b Request a new physical backup
@@ -131,4 +131,4 @@ plugins:
131131
background: false
132132
args:
133133
- -c
134-
- "kubectl cnpg status $NAME -n $NAMESPACE --context \"$CONTEXT\" --verbose 2>&1 | less -R"
134+
- "kubectl cnpg status $NAME -n $NAMESPACE --context \"$CONTEXT\" --verbose 2>&1 | less -R"

0 commit comments

Comments
 (0)