fix(control-plane): skip database reconciliation for gateways with no database_id - #176
Open
jhjaggars wants to merge 1 commit into
Open
fix(control-plane): skip database reconciliation for gateways with no database_id#176jhjaggars wants to merge 1 commit into
jhjaggars wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… database_id Gateways with an empty database_id have pre-existing self-managed PostgreSQL resources that should not be disturbed. Previously, the reconciler unconditionally resolved CNPG configuration and blocked reconciliation of these legacy gateways. Derive an explicit ReconcileDatabase flag from database_id, resolve CNPG configuration only when that flag is set, and use the flag to gate CNPG operator checks and database resource reconciliation. Validate the resolved CNPG namespace defensively instead of using it as the enablement signal.
jhjaggars
force-pushed
the
fix/skip-db-reconcile-empty-database-id
branch
from
August 21, 2026 13:51
d86042c to
483e883
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gateways with an empty
database_idhave pre-existing self-managed PostgreSQL resources (Deployment, PVC, Service, Secret) that should not be disturbed. Previously, the reconciler unconditionally resolved CNPG configuration, blocking reconciliation of these legacy gateways.Changes
ReconcileDatabaseflag directly from whether the gateway has adatabase_id.ManagedDatabaseand CNPG configuration only when database reconciliation is requested.ClusterNamespaceas a sentinel.database_idis empty, leaving existing database resources untouched.Validation
cd components/control-plane && go test ./...make check