K8SPG-779 | allow overriding wal_level#1439
Conversation
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this comment.
Pull request overview
This PR makes the PostgreSQL wal_level parameter configurable by moving it from Mandatory to Default parameters, allowing users to override it via spec.patroni.dynamicConfiguration.postgresql.parameters.
Changes:
- Moved
wal_levelfrom Mandatory to Default parameter set to enable user configuration - Updated unit test expectations to reflect the parameter category change
- Added comprehensive E2E test suite to verify dynamic configuration functionality
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/postgres/parameters.go | Moved wal_level from Mandatory to Default parameters with updated comment explaining it can be overridden |
| internal/postgres/parameters_test.go | Updated test expectations to verify wal_level is now in Default parameter set |
| e2e-tests/tests/dynamic-configuration/00-deploy-operator.yaml | E2E test setup: deploys operator |
| e2e-tests/tests/dynamic-configuration/00-assert.yaml | E2E test validation: verifies operator deployment |
| e2e-tests/tests/dynamic-configuration/01-create-cluster.yaml | E2E test: creates PostgreSQL cluster |
| e2e-tests/tests/dynamic-configuration/01-assert.yaml | E2E test validation: verifies cluster is ready with default configuration |
| e2e-tests/tests/dynamic-configuration/02-apply-configuration.yaml | E2E test: applies dynamic configuration to override wal_level to "replica" |
| e2e-tests/tests/dynamic-configuration/03-verify.yaml | E2E test: queries PostgreSQL to retrieve actual wal_level value |
| e2e-tests/tests/dynamic-configuration/03-assert.yaml | E2E test validation: confirms wal_level was changed to "replica" |
| e2e-tests/tests/dynamic-configuration/99-remove-cluster-gracefully.yaml | E2E test cleanup: removes cluster and operator |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e2e-tests/tests/dynamic-configuration/02-apply-configuration.yaml
Outdated
Show resolved
Hide resolved
e2e-tests/tests/dynamic-configuration/02-apply-configuration.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
| postgresql: | ||
| parameters: | ||
| wal_level: "replica" | ||
| restore_command: "exit 1" |
There was a problem hiding this comment.
what do we test with exit 1?
There was a problem hiding this comment.
doesn't have any significance in this test, it is just to ensure that the default restore_command can be overridden
There was a problem hiding this comment.
I'd use /bin/true for this, exit 1 might have unexpected consequences
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
commit: 1cee976 |
CHANGE DESCRIPTION
Problem:
wal_levelparameter is not configurableSolution
Make
wal_levelconfigurable via dynamicConfigurationFor Doc/QA, note the following restriction from pg docs:
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability