[HYPERSHELL-35] fix: restore self-managed gateway database fallback - #173
Closed
jsell-rh wants to merge 1 commit into
Closed
[HYPERSHELL-35] fix: restore self-managed gateway database fallback#173jsell-rh wants to merge 1 commit into
jsell-rh wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: openshift-online/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 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 |
jsell-rh
force-pushed
the
revert/pr-154-cnpg-cutover
branch
from
August 20, 2026 19:19
8f9efd3 to
68c29c0
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.
Incident
Production gateway creation returns HTTP 400 when
database_idis blank and zero or multipleManagedDatabaserecords exist:The deployed gateways still use their legacy per-gateway PostgreSQL workloads, so making the new CNPG assignment mandatory blocked new gateway creation before that cutover was operational.
Focused fix
This PR does not revert #154.
ManagedDatabasewhen exactly one eligible record exists.database_idinstead of rejecting the request.database_idselects a narrowly scoped legacy fallback in the controller: per-gateway PostgreSQL PVC, Deployment, Service, credentials, and NetworkPolicy.database_idcontinues through the existing CNPG path unchanged.uriandurl; existing passwords are preserved.All CNPG platform manifests, operators, APIs, database models, generated clients, and architecture from #154 remain. There are no platform database changes, schema migrations, or generated API/SDK changes in this PR.
Rollout safety
Controller-first prevents the API from accepting a blank assignment before the fallback reconciler is available. Existing
Running,Provisioning, andDegradedgateways remain phase-gated and are not automatically reprovisioned. Rolling back should use the reverse order: API first, then controller.Verification
Read-only production audit
Local Kind E2E
A gateway was created in a fleet with no
ManagedDatabase, using a blankdatabase_id.database_id: "".Running/Healthy.POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB,uri, andurl.Cluster,Database, orDatabaseRolewas created for the gateway.connectedagainst gateway version0.0.109.fallback-sandbox-ok), and delete all succeeded.Kind was running through its documented no-sudo high-port fallback. The local controller issuer was adjusted to include
:34339; that fixture-only change is not part of this PR. Routed API, console, and authenticated gateway status were exercised directly. The sandbox lifecycle used an explicit gateway Service port-forward because the local Envoy path truncated the long-lived gRPC watch trailer.Automated checks
go test ./...— control planego vet ./...— API server and control planegolangci-lint v2.12.2— API server and control plane, 0 issuesgit diff --checkThe full API integration harness is blocked locally during shared
TestMainsetup by PostgreSQL password authentication, before the focused tests run.