Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dagger/maintenance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (m *Maintenance) GenerateTestingValues(
Name: metadata.Name,
SQLName: metadata.SQLName,
SharedPreloadLibraries: metadata.SharedPreloadLibraries,
PostgresqlParameters: metadata.PostgresqlParameters,
PgImage: pgImage,
Version: version,
CreateExtension: metadata.CreateExtension,
Expand Down
27 changes: 14 additions & 13 deletions dagger/maintenance/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ type buildMatrix struct {
type versionMap map[string]map[string]string

type extensionMetadata struct {
Name string `hcl:"name" cty:"name"`
SQLName string `hcl:"sql_name" cty:"sql_name"`
ImageName string `hcl:"image_name" cty:"image_name"`
SharedPreloadLibraries []string `hcl:"shared_preload_libraries" cty:"shared_preload_libraries"`
ExtensionControlPath []string `hcl:"extension_control_path" cty:"extension_control_path"`
DynamicLibraryPath []string `hcl:"dynamic_library_path" cty:"dynamic_library_path"`
LdLibraryPath []string `hcl:"ld_library_path" cty:"ld_library_path"`
BinPath []string `hcl:"bin_path" cty:"bin_path"`
AutoUpdateOsLibs bool `hcl:"auto_update_os_libs" cty:"auto_update_os_libs"`
RequiredExtensions []string `hcl:"required_extensions" cty:"required_extensions"`
CreateExtension bool `hcl:"create_extension" cty:"create_extension"`
Versions versionMap `hcl:"versions" cty:"versions"`
Remain hcl.Body `hcl:",remain"`
Name string `hcl:"name" cty:"name"`
SQLName string `hcl:"sql_name" cty:"sql_name"`
ImageName string `hcl:"image_name" cty:"image_name"`
SharedPreloadLibraries []string `hcl:"shared_preload_libraries" cty:"shared_preload_libraries"`
PostgresqlParameters map[string]string `hcl:"postgresql_parameters" cty:"postgresql_parameters"`
ExtensionControlPath []string `hcl:"extension_control_path" cty:"extension_control_path"`
DynamicLibraryPath []string `hcl:"dynamic_library_path" cty:"dynamic_library_path"`
LdLibraryPath []string `hcl:"ld_library_path" cty:"ld_library_path"`
BinPath []string `hcl:"bin_path" cty:"bin_path"`
AutoUpdateOsLibs bool `hcl:"auto_update_os_libs" cty:"auto_update_os_libs"`
RequiredExtensions []string `hcl:"required_extensions" cty:"required_extensions"`
CreateExtension bool `hcl:"create_extension" cty:"create_extension"`
Versions versionMap `hcl:"versions" cty:"versions"`
Remain hcl.Body `hcl:",remain"`
}

const (
Expand Down
1 change: 1 addition & 0 deletions dagger/maintenance/testingvalues.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type TestingValues struct {
Name string `yaml:"name"`
SQLName string `yaml:"sql_name"`
SharedPreloadLibraries []string `yaml:"shared_preload_libraries"`
PostgresqlParameters map[string]string `yaml:"postgresql_parameters"`
PgImage string `yaml:"pg_image"`
Version string `yaml:"version"`
CreateExtension bool `yaml:"create_extension"`
Expand Down
1 change: 1 addition & 0 deletions pg-crash/metadata.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata = {
image_name = "pg-crash"
licenses = ["BSD-3-Clause"]
shared_preload_libraries = ["pg_crash"]
postgresql_parameters = {}
extension_control_path = []
dynamic_library_path = []
ld_library_path = []
Expand Down
1 change: 1 addition & 0 deletions pgaudit/metadata.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata = {
image_name = "pgaudit"
licenses = ["PostgreSQL"]
shared_preload_libraries = ["pgaudit"]
postgresql_parameters = {}
extension_control_path = []
dynamic_library_path = []
ld_library_path = []
Expand Down
1 change: 1 addition & 0 deletions pgvector/metadata.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata = {
image_name = "pgvector"
licenses = ["PostgreSQL"]
shared_preload_libraries = []
postgresql_parameters = {}
extension_control_path = []
dynamic_library_path = []
ld_library_path = []
Expand Down
1 change: 1 addition & 0 deletions postgis/metadata.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata = {
licenses = [ "GPL-2.0-or-later", "MIT", "LGPL-2.1-or-later",
"GPL-3.0-or-later", "Apache-2.0", "PostgreSQL", "Zlib" ]
shared_preload_libraries = []
postgresql_parameters = {}
extension_control_path = []
dynamic_library_path = []
ld_library_path = ["system"]
Expand Down
1 change: 1 addition & 0 deletions postgis/test/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ spec:
size: 1Gi

postgresql:
parameters: ($values.postgresql_parameters)
shared_preload_libraries: ($values.shared_preload_libraries)
extensions: ($values.extensions)
7 changes: 7 additions & 0 deletions templates/metadata.hcl.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ metadata = {
# Example: ["pgaudit"].
shared_preload_libraries = []

# TODO: Remove this comment block after customizing the file.
# `postgresql_parameters`: custom PostgreSQL configuration parameters to be set
# for this extension. Usually empty.
# Used in tests.
# Example: { "pgaudit.log_client" = "on" }.
postgresql_parameters = {}

# 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
Expand Down
1 change: 1 addition & 0 deletions test/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ spec:
size: 1Gi

postgresql:
parameters: ($values.postgresql_parameters)
shared_preload_libraries: ($values.shared_preload_libraries)
extensions: ($values.extensions)