Skip to content

Commit 8c89556

Browse files
IvanHuntersmyasnikovdaniil
authored andcommitted
fix(postgres): accept integer values for postgresql.parameters in schema
The template already coerces all parameter values to strings via 'toString | quote', but the JSON schema had 'additionalProperties: {type: string}' which caused Helm schema validation to fail before the template ran when users passed integer values (e.g. max_connections: 100). Accept both string and integer types in additionalProperties so that existing configurations with unquoted numbers continue to work. Signed-off-by: IvanHunters <[email protected]>
1 parent 243d20e commit 8c89556

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎packages/apps/postgres/values.schema.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,16 @@
137137
"default": {},
138138
"properties": {
139139
"parameters": {
140-
"description": "PostgreSQL server parameters. All values must be strings (quote numbers: \"100\"). BLOCKED (enable arbitrary code execution): archive_command, restore_command, ssl_passphrase_command, dynamic_library_path, local_preload_libraries, session_preload_libraries, shared_preload_libraries. Do NOT override CloudNativePG-managed parameters: archive_mode, primary_conninfo, wal_level, max_replication_slots.",
140+
"description": "PostgreSQL server parameters. String values are preferred (quote numbers: \"100\"); integer values are also accepted and converted to strings automatically. BLOCKED (enable arbitrary code execution): archive_command, restore_command, ssl_passphrase_command, dynamic_library_path, local_preload_libraries, session_preload_libraries, shared_preload_libraries. Do NOT override CloudNativePG-managed parameters: archive_mode, primary_conninfo, wal_level, max_replication_slots.",
141141
"type": "object",
142142
"default": {
143143
"max_connections": "100"
144144
},
145145
"additionalProperties": {
146-
"type": "string"
146+
"anyOf": [
147+
{"type": "string"},
148+
{"type": "integer"}
149+
]
147150
}
148151
}
149152
}

0 commit comments

Comments
 (0)