Skip to content

Commit e4da3c6

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 66dff15 commit e4da3c6

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
@@ -1469,6 +1469,11 @@ type ExtensionConfiguration struct {
14691469
// The list of directories inside the image which should be added to ld_library_path.
14701470
// +optional
14711471
LdLibraryPath []string `json:"ld_library_path,omitempty"`
1472+
1473+
// A list of directories within the image to be appended to the
1474+
// PostgreSQL process's `PATH` environment variable.
1475+
// +optional
1476+
BinPath []string `json:"bin_path,omitempty"`
14721477
}
14731478

14741479
// 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
@@ -4083,6 +4083,13 @@ spec:
40834083
ExtensionConfiguration is the configuration used to add
40844084
PostgreSQL extensions to the Cluster.
40854085
properties:
4086+
bin_path:
4087+
description: |-
4088+
A list of directories within the image to be appended to the
4089+
PostgreSQL process's `PATH` environment variable.
4090+
items:
4091+
type: string
4092+
type: array
40864093
dynamic_library_path:
40874094
description: |-
40884095
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
@@ -978,6 +978,7 @@ _Appears in:_
978978
| `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". | | | |
979979
| `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". | | | |
980980
| `ld_library_path` _string array_ | The list of directories inside the image which should be added to ld_library_path. | | | |
981+
| `bin_path` _string array_ | A list of directories within the image to be appended to the<br />PostgreSQL process's `PATH` environment variable. | | | |
981982

982983

983984
#### ExtensionSpec

0 commit comments

Comments
 (0)