feat: support PostgreSQL extensions in image catalogs#9781
Merged
leonardoce merged 32 commits intomainfrom Mar 2, 2026
Merged
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Collaborator
Author
|
/test |
Contributor
|
@NiccoloFei, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/21254640342 |
Member
|
/test |
Contributor
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/21364009489 |
Collaborator
Author
|
/test ft=image-volume-extensions |
Contributor
|
@NiccoloFei, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/21441273493 |
GabriFedi97
reviewed
Feb 3, 2026
GabriFedi97
reviewed
Feb 3, 2026
Co-authored-by: Gabriele Fedi <[email protected]> Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Add +listType=map and +listMapKey=name markers to the Extensions field in PostgresConfiguration, CatalogImage, and the generated CRDs. This makes the Kubernetes API server reject duplicate extension names without needing a webhook. Signed-off-by: Marco Nenciarini <[email protected]>
The webhook validated extension_control_path and dynamic_library_path for empty and duplicate values but skipped ld_library_path, allowing invalid configurations through. Signed-off-by: Marco Nenciarini <[email protected]>
Cover ordering independence, nil vs empty slices, and detection of differences in image references, pull policies, extension control paths, dynamic library paths, and ld library paths. Signed-off-by: Marco Nenciarini <[email protected]>
During a major version upgrade, the upgrade job's main container runs the new PostgreSQL binary but was mounting extension volumes from the old version stored in cluster status. Thread extensions as an explicit parameter through the volume creation chain and CreatePrimaryJob so the major upgrade reconciler can resolve and pass new-version extensions to the job while the init container keeps using old ones. Signed-off-by: Marco Nenciarini <[email protected]>
leonardoce
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend
ImageCatalogandClusterImageCatalogCRDs to allow definingPostgreSQL extension images via the
.spec.images[].extensionsstanza.This enables a "convention over configuration" approach where extension
details (image references, paths, etc.) can be centrally managed in a
catalog and inherited by Clusters.
Key behaviors:
.spec.postgresql.extensions.definitions.
configuration takes precedence.
Closes #8495