K8s: Migrate subchart Postgres to cloudpirates/postgres from bitnami/postgresql#3150
Conversation
Code Review by Qodo
1. postgres chart version unpinned
|
4fa6322 to
264a05c
Compare
| - repository: https://cloudpirates-io.github.io/helm-charts | ||
| version: ^0.19.0 | ||
| name: postgres | ||
| condition: postgres.enabled |
There was a problem hiding this comment.
1. postgres chart version unpinned 📘 Rule violation ⛨ Security
The Helm dependency on cloudpirates/postgres uses a caret semver range (^0.19.0), allowing automatic upgrades to newer compatible releases and reducing supply-chain reproducibility. This violates the requirement to pin versions in build/release automation to prevent drift.
Agent Prompt
## Issue description
The `postgres` dependency version is specified as a semver range (`^0.19.0`), which permits drift to newer releases and reduces reproducibility.
## Issue Context
The compliance requirement for build/release automation mandates explicit version pinning to reduce supply-chain drift risk.
## Fix Focus Areas
- charts/selenium-grid/Chart.yaml[25-28]
## Suggested approach
- Replace `version: ^0.19.0` with an exact pinned version (e.g., `version: 0.19.0`).
- (Optional but recommended) Run `helm dependency update` and commit the resulting `Chart.lock` so dependency resolution is locked with a digest.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - repository: https://cloudpirates-io.github.io/helm-charts | ||
| version: ^0.19.0 | ||
| name: postgres | ||
| condition: postgres.enabled |
There was a problem hiding this comment.
2. Old enable key still used 🐞 Bug ≡ Correctness
The chart now enables the Postgres dependency via postgres.enabled, so any existing configuration (and the repo’s own chart test script / README example) that sets postgresql.enabled=true will not install Postgres. This can break the external Session Map Postgres setup and will also break tests/charts/make/chart_test.sh because it sets a values path the chart no longer reads.
Agent Prompt
## Issue description
The Postgres subchart dependency condition was changed to `postgres.enabled`, but repo docs/tests still instruct/set `postgresql.enabled`. This leads to Postgres not being installed when users follow the README or when the chart test script runs.
## Issue Context
- `charts/selenium-grid/Chart.yaml` now uses `condition: postgres.enabled` for the Postgres dependency.
- `charts/selenium-grid/README.md` still shows `postgresql:\n enabled: true` in the external datastore example.
- `tests/charts/make/chart_test.sh` still runs Helm with `--set postgresql.enabled=true`.
## Fix Focus Areas
- charts/selenium-grid/README.md[1137-1149]
- tests/charts/make/chart_test.sh[235-240]
- charts/selenium-grid/Chart.yaml[25-28]
## Suggested fix
1. Update the README example to use:
```yaml
postgres:
enabled: true
```
2. Update the chart test script to set `--set postgres.enabled=true`.
3. If backward compatibility is desired for existing users, add a clear migration note (or implement a compatibility mechanism) so `postgresql.enabled` users don’t silently lose the dependency on upgrade.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
264a05c to
58200c8
Compare
…postgresql Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
58200c8 to
3730692
Compare
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
Add persistence configuration for PostgreSQL. Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
[skip test]
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
[skip test]
PR Summary by Qodo
Helm: Switch Selenium Grid Postgres subchart from Bitnami to cloudpirates/postgres
⚙️ Configuration changes📝 Documentation🕐 20-40 MinutesWalkthroughs
User Description
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Types of changes
Checklist
AI Description
Diagram
graph TD A["selenium-grid chart"] --> B["Chart.yaml deps"] --> C["postgres subchart"] --> D[("Postgres Service")] A --> E["values.yaml"] --> F["SessionMap JDBC config"] --> D A --> G["CONFIGURATION.md"] subgraph Legend direction LR _mod["Chart/module"] ~~~ _cfg["Config/doc"] ~~~ _db[("Database/service")] endHigh-Level Assessment
The following are alternative approaches to this PR:
1. Add backward-compatible alias for `postgresql.*`
2. Keep Bitnami subchart and only bump versions
3. Make the change explicitly breaking with an upgrade note/check
postgresql.*topostgres.*failmessage whenpostgresql.enabled=trueis setRecommendation: Proceed with the cloudpirates/postgres migration, but treat the
postgresql.*->postgres.*rename as a breaking configuration change: add an explicit upgrade note and/or template guardrail, and ensure ancillary references (e.g., chart test scripts and README examples) are updated to usepostgres.enabledto prevent confusing failures.File Changes
Documentation (1)
Other (2)