Skip to content

Commit 8041543

Browse files
committed
feat(extensions): accept bin_path field in extension configuration CRD
Allow the CRD schema for Cluster, ImageCatalog, and ClusterImageCatalog to include the bin_path field introduced in 1.29. The operator ignores the field since the Go struct simply skips unknown data during deserialization, but accepting it in the schema lets users share a single manifest across clusters running different CNPG versions. Closes #10280 Signed-off-by: Marco Nenciarini <[email protected]>
1 parent ce02d98 commit 8041543

6 files changed

Lines changed: 32 additions & 0 deletions

‎api/v1/cluster_types.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,11 @@ type ExtensionConfiguration struct {
14941494
// The list of directories inside the image which should be added to ld_library_path.
14951495
// +optional
14961496
LdLibraryPath []string `json:"ld_library_path,omitempty"`
1497+
1498+
// A list of directories within the image to be appended to the
1499+
// PostgreSQL process's `PATH` environment variable.
1500+
// +optional
1501+
BinPath []string `json:"bin_path,omitempty"`
14971502
}
14981503

14991504
// BootstrapConfiguration contains information about how to create the PostgreSQL

‎api/v1/zz_generated.deepcopy.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎config/crd/bases/postgresql.cnpg.io_clusterimagecatalogs.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ spec:
5858
ExtensionConfiguration is the configuration used to add
5959
PostgreSQL extensions to the Cluster.
6060
properties:
61+
bin_path:
62+
description: |-
63+
A list of directories within the image to be appended to the
64+
PostgreSQL process's `PATH` environment variable.
65+
items:
66+
type: string
67+
type: array
6168
dynamic_library_path:
6269
description: |-
6370
The list of directories inside the image which should be added to dynamic_library_path.

‎config/crd/bases/postgresql.cnpg.io_clusters.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4367,6 +4367,13 @@ spec:
43674367
ExtensionConfiguration is the configuration used to add
43684368
PostgreSQL extensions to the Cluster.
43694369
properties:
4370+
bin_path:
4371+
description: |-
4372+
A list of directories within the image to be appended to the
4373+
PostgreSQL process's `PATH` environment variable.
4374+
items:
4375+
type: string
4376+
type: array
43704377
dynamic_library_path:
43714378
description: |-
43724379
The list of directories inside the image which should be added to dynamic_library_path.

‎config/crd/bases/postgresql.cnpg.io_imagecatalogs.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ spec:
5757
ExtensionConfiguration is the configuration used to add
5858
PostgreSQL extensions to the Cluster.
5959
properties:
60+
bin_path:
61+
description: |-
62+
A list of directories within the image to be appended to the
63+
PostgreSQL process's `PATH` environment variable.
64+
items:
65+
type: string
66+
type: array
6067
dynamic_library_path:
6168
description: |-
6269
The list of directories inside the image which should be added to dynamic_library_path.

‎docs/src/cloudnative-pg.v1.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ _Appears in:_
989989
| `extension_control_path` _string array_ | The list of directories inside the image which should be added to extension_control_path.<br />If not defined, defaults to "/share". | | | |
990990
| `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". | | | |
991991
| `ld_library_path` _string array_ | The list of directories inside the image which should be added to ld_library_path. | | | |
992+
| `bin_path` _string array_ | A list of directories within the image to be appended to the<br />PostgreSQL process's `PATH` environment variable. | | | |
992993

993994

994995
#### ExtensionSpec

0 commit comments

Comments
 (0)