Use External DNS in OBC Host in Case OBC Is Remote OBC#1890
Use External DNS in OBC Host in Case OBC Is Remote OBC#1890shirady wants to merge 2 commits intonoobaa:masterfrom
Conversation
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
📝 WalkthroughWalkthroughExtends the bucket provisioner to detect and handle remote OBC instances by overriding connection endpoints with externally exposed DNS details from service status. Adds a helper function to extract and parse external DNS information, with fallback warning event emission when external DNS is unavailable. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/obc/provisioner.go`:
- Around line 951-971: Rename the IsVectorService parameter to isVectorService
(lowercase) and update getExternalDNSDetails to set a serviceName string based
on isVectorService (e.g., "s3" vs "vectors") to use in error messages; obtain
the port string via portStr := uri.Port(), use strconv.Atoi(portStr) and, on
error, include portStr (not hostname) in the formatted error (and reference
serviceName in the "no external ..." error) so messages correctly reflect the
service type and the failing port value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3822c726-c187-4262-8bd6-65cda13b251f
📒 Files selected for processing (1)
pkg/obc/provisioner.go
Additional Testing informationWe can also deploy a pod to consume the details directly - On the client cluster - apply the pod: Check the logs: |
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
Describe the problem
Part of RHSTOR-6230
In case the OBC is remote OBC we would like the details of the
BUCKET_HOSTto be of the external DNS instead of the internal DNS, as those details are copied to the config map on the client cluster.Explain the changes
remote-obc-creation: "true".Issues:
Testing Instructions:
Manul Test:
Requirements:
Steps:
BUCKET_HOSTwill be external DNS (same as it is on the provider cluster withoc get route s3 -n openshift-storage)Note: We can also deploy a pod to consume the details directly - see comment below.
Note: Manual test was done only for S3 OBCs.
Summary by CodeRabbit