Fix backward compatibility for MaaS DB config namespace detection#2991
Conversation
Detect INFRA_NAMESPACE from the deployed maas-controller instead of unconditionally deriving the infra namespace. Operators without INFRA_NAMESPACE support (pre-3.5, EA2 before July 13 rebuild) place maas-db-config in the applications namespace; new operators with INFRA_NAMESPACE=AUTO use the separate infra namespace.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PostgreSQL configuration script detects ChangesMaas PostgreSQL Namespace Configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: antowaddle, bdattoma, FedeAlonso The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |



Summary
before deciding where to place maas-db-config
Problem
PR #2987 unconditionally placed maas-db-config in a separate infra namespace (redhat-ai-gateway-infra), assuming all operators have INFRA_NAMESPACE=AUTO
(added by MaaS PR #1051, merged July 7). Operators built before that date — including all EA2 FBC images prior to the July 13 rebuild — expect
maas-db-config in the applications namespace. This caused MaaS DB secret not-found errors on older operator versions.
How it works
detect_infra_namespace() queries the maas-controller deployment for its INFRA_NAMESPACE env var:
Testing:
dashboard-e2e-tests/1814
Using: quay.io/rhoai/rhoai-fbc-fragment@sha256:6f8c6350ec16320668c7977c12219b2170432fff4d3626ca82dfc4ed909b7405 (Same that failed in ob/rhoai/job/3.5-ea.2/job/selfmanaged/job/cli/job/aws/job/rhoai-smoke/6/)
Before this change:
Build dashboard-e2e-tests/1815

Using the same operater image
After this change:
dashboard-e2e-tests/1817
Using: Latest 3.5 GA
With this fix running:
WIP