From 58e1dd04e9f70781f01334c1774d9cd5eb561b6d Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Fri, 6 Feb 2026 12:54:08 +1100 Subject: [PATCH 1/4] chore: integrate `metadata.hcl.tmpl` with comments and instructions Signed-off-by: Gabriele Bartolini --- templates/metadata.hcl.tmpl | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/templates/metadata.hcl.tmpl b/templates/metadata.hcl.tmpl index cffc0ea..1b80dfa 100644 --- a/templates/metadata.hcl.tmpl +++ b/templates/metadata.hcl.tmpl @@ -1,5 +1,45 @@ # SPDX-FileCopyrightText: Copyright © contributors to CloudNativePG, established as CloudNativePG a Series of LF Projects, LLC. # SPDX-License-Identifier: Apache-2.0 +# + +# TODO: REMOVE ALL COMMENTS BELOW BEFORE FINALIZING +# ############################################################ +# IMPORTANT: this file is a template. All comments (lines starting # with "#" +# or block comments) MUST be removed from the final `metadata.hcl` file before +# publishing or using it in production. The comments are only explanatory notes +# for authors of the contribution and must not remain in the final +# `metadata.hcl`. +# ############################################################ +# +# Field notes (keep here only while editing the template): +# +# - `image_name`: MUST be unique across the container registry because +# it identifies the image (e.g. ghcr.io/cloudnative-pg/). +# +# - `shared_preload_libraries`: list libraries to be added to +# `shared_preload_libraries` in Postgres. Normally empty. +# Example: ["pgaudit"]. +# +# - `extension_control_path`: if EMPTY (`[]`), the operator follows the CNPG +# convention and will add the image's `share` directory to +# `extension_control_path`. +# See: https://cloudnative-pg.io/docs/current/imagevolume_extensions#image-specifications +# +# - `dynamic_library_path`: if EMPTY (`[]`) the operator will add the image's +# `lib` directory to `dynamic_library_path`. +# +# - `ld_library_path`: this SHOULD be defined when your extension needs +# additional (usually system) libraries loaded into Postgres before startup. If +# left EMPTY (`[]`) the operator will NOT alter `ld_library_path`. See the +# `postgis` extension metadata for an example usage. +# +# - `auto_update_os_libs`: set to true to allow the maintenance tooling +# to update OS libraries automatically; look at the `postgis` example. +# +# - `required_extensions`: must contain the name(s) of the sibling +# folders in this repository that contain a required extension. +# +# ############################################################ metadata = { name = "{{ .Name }}" sql_name = "{{ .Name }}" From 8c0bbb0d800c4aca2bef54c63c4582656c4dcd71 Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Fri, 6 Feb 2026 13:02:28 +1100 Subject: [PATCH 2/4] chore: changed format Signed-off-by: Gabriele Bartolini --- templates/metadata.hcl.tmpl | 73 +++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/templates/metadata.hcl.tmpl b/templates/metadata.hcl.tmpl index 1b80dfa..0f39e2b 100644 --- a/templates/metadata.hcl.tmpl +++ b/templates/metadata.hcl.tmpl @@ -1,54 +1,47 @@ # SPDX-FileCopyrightText: Copyright © contributors to CloudNativePG, established as CloudNativePG a Series of LF Projects, LLC. # SPDX-License-Identifier: Apache-2.0 -# - -# TODO: REMOVE ALL COMMENTS BELOW BEFORE FINALIZING -# ############################################################ -# IMPORTANT: this file is a template. All comments (lines starting # with "#" -# or block comments) MUST be removed from the final `metadata.hcl` file before -# publishing or using it in production. The comments are only explanatory notes -# for authors of the contribution and must not remain in the final -# `metadata.hcl`. -# ############################################################ -# -# Field notes (keep here only while editing the template): -# -# - `image_name`: MUST be unique across the container registry because -# it identifies the image (e.g. ghcr.io/cloudnative-pg/). -# -# - `shared_preload_libraries`: list libraries to be added to -# `shared_preload_libraries` in Postgres. Normally empty. -# Example: ["pgaudit"]. -# -# - `extension_control_path`: if EMPTY (`[]`), the operator follows the CNPG -# convention and will add the image's `share` directory to -# `extension_control_path`. -# See: https://cloudnative-pg.io/docs/current/imagevolume_extensions#image-specifications -# -# - `dynamic_library_path`: if EMPTY (`[]`) the operator will add the image's -# `lib` directory to `dynamic_library_path`. -# -# - `ld_library_path`: this SHOULD be defined when your extension needs -# additional (usually system) libraries loaded into Postgres before startup. If -# left EMPTY (`[]`) the operator will NOT alter `ld_library_path`. See the -# `postgis` extension metadata for an example usage. -# -# - `auto_update_os_libs`: set to true to allow the maintenance tooling -# to update OS libraries automatically; look at the `postgis` example. -# -# - `required_extensions`: must contain the name(s) of the sibling -# folders in this repository that contain a required extension. -# -# ############################################################ metadata = { name = "{{ .Name }}" sql_name = "{{ .Name }}" + + # TODO: Remove this comment block after customizing the file. + # `image_name`: MUST be unique across the container registry because + # it identifies the image (e.g. ghcr.io/cloudnative-pg/) image_name = "{{ .Name }}" + + # TODO: Remove this comment block after customizing the file. + # `shared_preload_libraries`: list libraries to be added to + # `shared_preload_libraries` in Postgres. Normally empty. + # Example: ["pgaudit"]. shared_preload_libraries = [] + + # TODO: Remove this comment block after customizing the file. + # `extension_control_path`: if EMPTY (`[]`), the operator follows the CNPG + # convention and will add the image's `share` directory to + # `extension_control_path`. + # See: https://cloudnative-pg.io/docs/current/imagevolume_extensions#image-specifications extension_control_path = [] + + # TODO: Remove this comment block after customizing the file. + # `dynamic_library_path`: if EMPTY (`[]`) the operator will add the image's + # `lib` directory to `dynamic_library_path`. dynamic_library_path = [] + + # TODO: Remove this comment block after customizing the file. + # `ld_library_path`: this SHOULD be defined when your extension needs + # additional (usually system) libraries loaded into Postgres before startup. + # If left EMPTY (`[]`) the operator will NOT alter `ld_library_path`. See the + # `postgis` extension metadata for an example usage. ld_library_path = [] + + # TODO: Remove this comment block after customizing the file. + # `auto_update_os_libs`: set to true to allow the maintenance tooling + # to update OS libraries automatically; look at the `postgis` example. auto_update_os_libs = false + + # TODO: Remove this comment block after customizing the file. + # `required_extensions`: must contain the name(s) of the sibling + # folders in this repository that contain a required extension. required_extensions = [] versions = { From 1a159ff301c95993b9883b96ac8dead1d0f8088a Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Fri, 6 Feb 2026 19:18:38 +1100 Subject: [PATCH 3/4] chore: integrated comments Signed-off-by: Gabriele Bartolini --- templates/metadata.hcl.tmpl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/metadata.hcl.tmpl b/templates/metadata.hcl.tmpl index 0f39e2b..4f0d022 100644 --- a/templates/metadata.hcl.tmpl +++ b/templates/metadata.hcl.tmpl @@ -11,27 +11,31 @@ metadata = { # TODO: Remove this comment block after customizing the file. # `shared_preload_libraries`: list libraries to be added to - # `shared_preload_libraries` in Postgres. Normally empty. + # `shared_preload_libraries` in Postgres. Usually empty. + # Used in tests and to generate image catalogs. # Example: ["pgaudit"]. shared_preload_libraries = [] # TODO: Remove this comment block after customizing the file. # `extension_control_path`: if EMPTY (`[]`), the operator follows the CNPG # convention and will add the image's `share` directory to - # `extension_control_path`. + # `extension_control_path`. Usually empty. + # Used in tests and to generate image catalogs. # See: https://cloudnative-pg.io/docs/current/imagevolume_extensions#image-specifications extension_control_path = [] # TODO: Remove this comment block after customizing the file. # `dynamic_library_path`: if EMPTY (`[]`) the operator will add the image's - # `lib` directory to `dynamic_library_path`. + # `lib` directory to `dynamic_library_path`. Usually empty. + # Used in tests and to generate image catalogs. dynamic_library_path = [] # TODO: Remove this comment block after customizing the file. # `ld_library_path`: this SHOULD be defined when your extension needs # additional (usually system) libraries loaded into Postgres before startup. # If left EMPTY (`[]`) the operator will NOT alter `ld_library_path`. See the - # `postgis` extension metadata for an example usage. + # `postgis` extension metadata for an example usage. Usually empty. + # Used in tests and to generate image catalogs. ld_library_path = [] # TODO: Remove this comment block after customizing the file. From 624eb7fb54608211d2c0132ed7ce6cca26588d1c Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Sat, 7 Feb 2026 00:20:28 +1100 Subject: [PATCH 4/4] fix: remove shared libraries from image catalogs Signed-off-by: Gabriele Bartolini --- templates/metadata.hcl.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/metadata.hcl.tmpl b/templates/metadata.hcl.tmpl index 4f0d022..84fad8e 100644 --- a/templates/metadata.hcl.tmpl +++ b/templates/metadata.hcl.tmpl @@ -12,7 +12,7 @@ metadata = { # TODO: Remove this comment block after customizing the file. # `shared_preload_libraries`: list libraries to be added to # `shared_preload_libraries` in Postgres. Usually empty. - # Used in tests and to generate image catalogs. + # Used in tests. # Example: ["pgaudit"]. shared_preload_libraries = []