Skip to content

Commit 313d8b7

Browse files
committed
docs: import CloudNativePG v1.29.0
1 parent 447a2d5 commit 313d8b7

File tree

16 files changed

+561
-135
lines changed

16 files changed

+561
-135
lines changed

website/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type * as Preset from '@docusaurus/preset-classic';
66

77
const versionsConfig = require('./versions_config.json') as Record<string, import('@docusaurus/plugin-content-docs').VersionOptions>;
88

9-
const lastVersion = '1.28';
9+
const lastVersion = '1.29';
1010

1111
const config: Config = {
1212
title: 'CloudNativePG',

website/versioned_docs/version-1.29/cloudnative-pg.v1.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,26 @@ _Appears in:_
996996
| `dynamic_library_path` _string array_ | The list of directories inside the image which should be added to dynamic_library_path.<br />If not defined, defaults to "/lib". | | | |
997997
| `ld_library_path` _string array_ | The list of directories inside the image which should be added to ld_library_path. | | | |
998998
| `bin_path` _string array_ | A list of directories within the image to be appended to the<br />PostgreSQL process's `PATH` environment variable. | | | |
999+
| `env` _[ExtensionEnvVar](#extensionenvvar) array_ | Env is a list of custom environment variables to be set in the<br />PostgreSQL process for this extension. It is the responsibility of the<br />cluster administrator to ensure the variables are correct for the<br />specific extension. Note that changes to these variables require<br />a manual cluster restart to take effect. | | | |
1000+
1001+
1002+
#### ExtensionEnvVar
1003+
1004+
1005+
1006+
ExtensionEnvVar defines an environment variable for a specific extension
1007+
image volume.
1008+
1009+
1010+
1011+
_Appears in:_
1012+
1013+
- [ExtensionConfiguration](#extensionconfiguration)
1014+
1015+
| Field | Description | Required | Default | Validation |
1016+
| --- | --- | --- | --- | --- |
1017+
| `name` _string_ | Name of the environment variable to be injected into the<br />PostgreSQL process. | True | | MinLength: 1 <br />Pattern: `^[a-zA-Z_][a-zA-Z0-9_]*$` <br /> |
1018+
| `value` _string_ | Value of the environment variable. CloudNativePG performs a direct<br />replacement of this value, with support for placeholder expansion.<br />The $\{`image_root`\} placeholder resolves to the absolute mount path<br />of the extension's volume (e.g., `/extensions/my-extension`). This<br />is particularly useful for allowing applications or libraries to<br />locate specific directories within the mounted image.<br />Unrecognized placeholders are rejected. To include a literal $\{...\}<br />in the value, escape it as $$\{...\}. | True | | MinLength: 1 <br /> |
9991019

10001020

10011021
#### ExtensionSpec

website/versioned_docs/version-1.29/cluster_conf.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ Use this field only in case of
9191

9292
## Environment variables
9393

94+
:::important
95+
Environment variables reserved for operator usage (names starting with `PG` or
96+
`CNPG_`, plus `POD_NAME`, `NAMESPACE`, and `CLUSTER_NAME`) cannot be set
97+
through the `env` and `envFrom` fields and are rejected at admission time.
98+
:::
99+
94100
You can customize some system behavior using environment variables. One example
95101
is the `LDAPCONF` variable, which can point to a custom LDAP configuration
96102
file. Another example is the `TZ` environment variable, which represents the

website/versioned_docs/version-1.29/cnpg_i.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ CNPG-I is inspired by the Kubernetes
4141
The operator communicates with registered plugins using **gRPC**, following the
4242
[CNPG-I protocol](https://github.com/cloudnative-pg/cnpg-i/blob/main/docs/protocol.md).
4343

44-
CloudNativePG discovers plugins **at startup**. You can register them in one of two ways:
44+
You can register plugins in one of two ways:
4545

4646
- Sidecar container – run the plugin inside the operator’s Deployment
4747
- Standalone Deployment – run the plugin as a separate workload in the same
@@ -51,7 +51,9 @@ In both cases, the plugin must be packaged as a container image.
5151

5252
### Sidecar Container
5353

54-
When running as a sidecar, the plugin must expose its gRPC server via a **Unix
54+
Sidecar plugins are discovered once at operator startup.
55+
56+
The plugin must expose its gRPC server via a **Unix
5557
domain socket**. This socket must be placed in a directory shared with the
5658
operator container, mounted at the path set in `PLUGIN_SOCKET_DIR` (default:
5759
`/plugin`).
@@ -89,11 +91,8 @@ spec:
8991
Running a plugin as its own Deployment decouples its lifecycle from the
9092
operator’s and allows independent scaling. In this setup, the plugin exposes a
9193
TCP gRPC endpoint behind a Service, with **mTLS** for secure communication.
92-
93-
:::warning
94-
CloudNativePG does **not** discover plugins dynamically. If you deploy a new
95-
plugin, you must **restart the operator** to detect it.
96-
:::
94+
Standalone plugins are discovered dynamically by watching for Services with the
95+
required labels and annotations — no operator restart is needed.
9796
9897
Example Deployment:
9998

website/versioned_docs/version-1.29/imagevolume_extensions.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ extension image, particularly when:
374374
- Multiple extensions are bundled in the same image.
375375
- The image uses a custom directory structure.
376376
- The extension requires external binaries to function properly.
377+
- The extension requires setting specific environment variables.
377378

378379
Following the *"convention over configuration"* paradigm, CloudNativePG allows
379380
you to finely control the configuration of each extension image through the
@@ -392,6 +393,8 @@ following fields:
392393
- `bin_path`: A list of relative paths within the container image to be
393394
appended to the `PATH` environment variable of the Postgres process,
394395
allowing PostgreSQL to locate binaries at runtime.
396+
- `env`: A list of `name` and `value` pairs to be set as environment variables within
397+
the Postgres process.
395398

396399
This flexibility enables you to support complex or non-standard extension
397400
images while maintaining clarity and predictability.
@@ -539,6 +542,94 @@ need to manually restart the cluster (e.g., using `cnpg restart`) after
539542
modifying `bin_path`.
540543
:::
541544

545+
### Environment variables for extensions
546+
547+
Certain extensions require specific environment variables to be set within the
548+
PostgreSQL process to function correctly. You can define these variables using
549+
the `env` field within the extension's configuration.
550+
551+
The following example demonstrates how to set a static variable (`FOO`) and a
552+
variable using a placeholder (`BAR`):
553+
554+
```yaml
555+
# ...
556+
spec:
557+
# ... <snip>
558+
postgresql:
559+
# ... <snip>
560+
extensions:
561+
- name: my-extension
562+
image:
563+
reference: "ghcr.io/org/my-extension:latest"
564+
env:
565+
- name: FOO
566+
value: "static_value"
567+
- name: BAR
568+
value: "${image_root}/lib"
569+
# ... <snip>
570+
# ...
571+
```
572+
573+
#### Dynamic Placeholder Expansion
574+
575+
The `value` field supports placeholder expansion to allow for dynamic
576+
configuration based on the extension's environment.
577+
The following placeholders are currently supported:
578+
579+
| Placeholder | Description |
580+
| :--- | :--- |
581+
| `${image_root}` | Resolves to the absolute mount path of the extension's volume (e.g., `/extensions/my-extension`). |
582+
583+
The `${image_root}` placeholder is particularly useful when an application or a
584+
shared library within the extension image needs an environment variable to
585+
point to a specific subdirectory or file inside its own mounted volume.
586+
587+
In the example above, if the extension is mounted at
588+
`/extensions/my-extension`, the variable `BAR` will resolve to
589+
`/extensions/my-extension/lib`, allowing the library to locate its
590+
dependencies regardless of the specific mount path chosen by the operator.
591+
592+
:::tip
593+
Unrecognized placeholders (e.g., `${typo}`) are rejected at admission time.
594+
If you need a literal `${...}` in a value, escape it by doubling the dollar
595+
sign: `$${...}`. For example, a value of `$${not_expanded}` will produce the
596+
literal string `${not_expanded}`.
597+
:::
598+
599+
#### Precedence and Conflict Resolution
600+
601+
Environment variables for the PostgreSQL process can be defined in multiple
602+
places. When the same variable name appears in more than one location, the
603+
following precedence order applies (highest priority last):
604+
605+
1. **`spec.env` / `spec.envFrom`**: Variables defined at the cluster level are
606+
injected by Kubernetes into the container environment and serve as the base.
607+
2. **Extension `env`**: Variables defined in the `env` field of each extension
608+
override any cluster-level variable with the same name.
609+
3. **Extension order**: If multiple extensions define the same variable, the
610+
extension listed last in the `extensions` array takes precedence.
611+
612+
CloudNativePG emits a warning in the instance manager logs when an extension
613+
environment variable overwrites a value that was already set by a previous
614+
extension, to help diagnose potential conflicts.
615+
616+
:::important
617+
**Reserved variables**: Environment variables reserved for operator usage
618+
(names starting with `PG` or `CNPG_`, plus `POD_NAME`, `NAMESPACE`, and
619+
`CLUSTER_NAME`) and variables managed by dedicated fields (`PATH` via
620+
`bin_path`, `LD_LIBRARY_PATH` via `ld_library_path`) cannot be set through
621+
the `env` field and are rejected at admission time.
622+
:::
623+
624+
:::warning
625+
**Manual Restart Required**: Because environment variables are injected when
626+
the PostgreSQL process starts, any changes to the `env` section **require a
627+
cluster restart**. CloudNativePG does **not** automatically trigger a rollout
628+
for these changes. After updating the `env` field in your manifest, you must
629+
manually restart the cluster (e.g., using `kubectl cnpg restart`) for the new
630+
values to take effect.
631+
:::
632+
542633
## Image Specifications
543634

544635
A standard extension container image for CloudNativePG includes two

website/versioned_docs/version-1.29/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ container images for both the operator and PostgreSQL (the operand).
6464

6565
The CloudNativePG operator container images are available on the
6666
[`cloudnative-pg` project's GitHub Container Registry](https://github.com/cloudnative-pg/cloudnative-pg/pkgs/container/cloudnative-pg)
67-
in three different flavors:
67+
in two different flavors:
6868

6969
- Debian 12 distroless
7070
- Red Hat UBI 9 micro (suffix `-ubi9`)

website/versioned_docs/version-1.29/installation_upgrade.md

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ title: Installation and upgrades
1414
The operator can be installed like any other resource in Kubernetes,
1515
through a YAML manifest applied via `kubectl`.
1616

17-
You can install the [latest operator manifest](https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-1.29.0-rc1.yaml)
17+
You can install the [latest operator manifest](https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.29/releases/cnpg-1.29.0.yaml)
1818
for this minor release as follows:
1919

2020
```sh
2121
kubectl apply --server-side -f \
22-
https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-1.29.0-rc1.yaml
22+
https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.29/releases/cnpg-1.29.0.yaml
2323
```
2424

2525
You can verify that with:
@@ -267,22 +267,16 @@ removed before installing the new one. This won't affect user data but
267267
only the operator itself.
268268

269269

270-
### Upgrading to 1.28.0 or 1.27.x
270+
### Upgrading to 1.29.0 or 1.28.x
271271

272272
:::info[Important]
273273
We strongly recommend that all CloudNativePG users upgrade to version
274-
1.28.0, or at least to the latest stable version of your current minor release
275-
(e.g., 1.27.x).
274+
1.29.0, or at least to the latest stable version of your current minor release
275+
(e.g., 1.28.x).
276276
:::
277277

278278
### Upgrading to 1.27 from a previous minor version
279279

280-
:::info[Important]
281-
We strongly recommend that all CloudNativePG users upgrade to version
282-
1.27.0, or at least to the latest stable version of your current minor release
283-
(e.g., 1.26.1).
284-
:::
285-
286280
Version 1.27 introduces a change in the default behavior of the
287281
[liveness probe](instance_manager.md#liveness-probe): it now enforces the
288282
[shutdown of an isolated primary](instance_manager.md#primary-isolation)
@@ -299,65 +293,6 @@ spec:
299293
enabled: false
300294
```
301295
302-
### Upgrading to 1.26 from a previous minor version
303-
304-
:::warning
305-
Due to changes in the startup probe for the manager component
306-
([#6623](https://github.com/cloudnative-pg/cloudnative-pg/pull/6623)),
307-
upgrading the operator will trigger a restart of your PostgreSQL clusters,
308-
even if in-place updates are enabled (`ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES=true`).
309-
Your applications will need to reconnect to PostgreSQL after the upgrade.
310-
:::
311-
312-
#### Deprecation of backup metrics and fields in the `Cluster` `.status`
313-
314-
With the transition to a backup and recovery agnostic approach based on CNPG-I
315-
plugins in CloudNativePG, which began with version 1.26.0 for Barman Cloud, we
316-
are starting the deprecation period for the following fields in the `.status`
317-
section of the `Cluster` resource:
318-
319-
- `firstRecoverabilityPoint`
320-
- `firstRecoverabilityPointByMethod`
321-
- `lastSuccessfulBackup`
322-
- `lastSuccessfulBackupByMethod`
323-
- `lastFailedBackup`
324-
325-
The following Prometheus metrics are also deprecated:
326-
327-
- `cnpg_collector_first_recoverability_point`
328-
- `cnpg_collector_last_failed_backup_timestamp`
329-
- `cnpg_collector_last_available_backup_timestamp`
330-
331-
:::warning
332-
If you have migrated to a plugin-based backup and recovery solution such as
333-
Barman Cloud, these fields and metrics are no longer synchronized and will
334-
not be updated. Users still relying on the in-core support for Barman Cloud
335-
and volume snapshots can continue to use these fields for the time being.
336-
:::
337-
338-
Under the new plugin-based approach, multiple backup methods can operate
339-
simultaneously, each with its own timeline for backup and recovery. For
340-
example, some plugins may provide snapshots without WAL archiving, while others
341-
support continuous archiving.
342-
343-
Because of this flexibility, maintaining centralized status fields in the
344-
`Cluster` resource could be misleading or confusing, as they would not
345-
accurately represent the state across all configured backup methods.
346-
For this reason, these fields are being deprecated.
347-
348-
Instead, each plugin is responsible for exposing its own backup status
349-
information and providing metrics back to the instance manager for monitoring
350-
and operational awareness.
351-
352-
#### Declarative Hibernation in the `cnpg` plugin
353-
354-
In this release, the `cnpg` plugin for `kubectl` transitions from an imperative
355-
to a [declarative approach for cluster hibernation](declarative_hibernation.md).
356-
The `hibernate on` and `hibernate off` commands are now convenient shortcuts
357-
that apply declarative changes to enable or disable hibernation.
358-
The `hibernate status` command has been removed, as its purpose is now
359-
fulfilled by the standard `status` command.
360-
361296
## Verifying release assets
362297
363298
CloudNativePG cryptographically signs all official release assets. Verifying these

0 commit comments

Comments
 (0)