Repository navigation
Add condition for cnpg - #496
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Disabling CloudNativePG still unconditionally manages cnpg-system, causing Helm ownership conflicts that block reuse of an existing installation unless namespace creation can be skipped while retaining sidecar and WAL-replica resources.
1 open issue
What changed in this PR
Adds a Helm option to disable the bundled CloudNative-PG dependency, supporting existing CNPG installations as requested in #495.
Changes:
- Makes the CNPG dependency conditional on
cloudnative-pg.enabled. - Defaults the option to
true, preserving existing installation behavior.
| File | Description |
|---|---|
operator/documentdb-helm-chart/values.yaml |
Adds the enabled-by-default CNPG installation option. |
operator/documentdb-helm-chart/Chart.yaml |
Applies the option to the CNPG dependency. |
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Critical issues remain: inline Helm whitespace trimming produces invalid YAML, and disabling the CNPG dependency during an upgrade can delete the managed Namespace and its database workloads.
4 open issues
1 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Disabling CNPG during an upgrade causes Helm to delete the previously managed namespace, destroying retained sidecar and TLS resources and other workloads without a safe retention or migration path.
4 open issues
1 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the namespace lifecycle changes can delete existing workloads during upgrades or cause Helm ownership conflicts during installation.
3 open issues
1 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The namespace condition can cause Helm upgrades with cloudnative-pg.enabled=false or legacy --reuse-values to delete the release-owned namespace, destroying the sidecar injector, TLS Secrets, and other resources.
1 open issue
3 resolved since last review
Review effort: Balanced
| @@ -1,7 +1,9 @@ | |||
| {{- if and (index .Values "cloudnative-pg").enabled (index .Values "cloudnative-pg").namespaceOverride }} | |||
There was a problem hiding this comment.
I don't rally know what's the best approach here
Users having the operator installed are unlikely to have an existing CNPG installation, as it would clash with the operator already. in order to resolve this a new "createNamespace" value would be needed which new users wanting to skip cnpg installation would also need to set and might fall into the trap of not doing and therefore bricking the install
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningeffort from diff stats (21+13 LOC, 5 files); LLM: Small bug fix PR addressing issue #495 related to a missing CNPG condition in the controllers logic. If a label is wrong, remove it manually and ping |
- Add option to specify cnpg namespace Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Michael Rittmeister <[email protected]>
|
Rebase to get DCO to pass |
Prepare operator 1.2.0, the first release with the documentdb.io/v1 API. The default DocumentDB engine stays at 1.0.0. - Chart.yaml version/appVersion 1.1.1 -> 1.2.0; Helm test image tags - CHANGELOG: [Unreleased] -> [1.2.0] - 2026-11-11 with summary; add the documentdb#496 and documentdb#493 changes that shipped in 1.1.1; fix the 1.1.0 date (released 2026-11-04) - release-strategy.md: v1.2.x support, Kubernetes, dependency and component rows - before-you-start.md / index.md: operator 1.2.0 - upgrades.md: the CRD step is required from 1.1.x too, not only 1.0.x; document rolling back from 1.2.0 to 1.1.x Co-authored-by: Copilot <[email protected]> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain <[email protected]>


Fixes #495