-
Notifications
You must be signed in to change notification settings - Fork 214
feat: add support for Ingress .spec.appsDomain #2798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughGetDomain now first attempts to return OpenShift Ingress Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant GetDomain
participant Client
participant Ingress
Caller->>GetDomain: GetDomain()
GetDomain->>Client: Get(ingress "cluster")
alt Client returns error
Client-->>GetDomain: error
GetDomain-->>Caller: return wrapped error
else Client returns ingress
GetDomain->>Ingress: read spec.appsDomain
alt appsDomain present & non-empty
Ingress-->>GetDomain: appsDomain value
GetDomain-->>Caller: return appsDomain
else appsDomain missing/empty
GetDomain->>Ingress: read spec.domain
alt domain present & non-empty
Ingress-->>GetDomain: domain value
GetDomain-->>Caller: return domain
else domain missing/empty
GetDomain-->>Caller: return "spec.domain not found or empty"
end
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (2)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pkg/cluster/cluster_config.go(1 hunks)pkg/cluster/cluster_config_test.go(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
pkg/cluster/cluster_config_test.go (2)
pkg/cluster/gvk/gvk.go (2)
Group(124-128)OpenshiftIngress(184-188)pkg/cluster/cluster_config.go (1)
GetDomain(97-123)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build/push catalog image
- GitHub Check: golangci-lint
- GitHub Check: Run tests and collect coverage on internal and pkg
🔇 Additional comments (2)
pkg/cluster/cluster_config_test.go (2)
31-31: LGTM!The extension to handle
key.Name == "cluster"correctly enables error injection forGetDomaintest scenarios.
204-351: LGTM! Comprehensive test coverage.The test function thoroughly validates the new
appsDomainprecedence logic with well-structured test cases covering:
- Precedence of
appsDomainoverdomain- Fallback behavior for empty or missing
appsDomain- Error handling for missing
domainand ingress not found scenarios
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2798 +/- ##
==========================================
+ Coverage 49.91% 50.09% +0.17%
==========================================
Files 144 144
Lines 10413 10420 +7
==========================================
+ Hits 5198 5220 +22
+ Misses 4661 4644 -17
- Partials 554 556 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- if user set appsDomain in default Ingress CR, we will use it as domain for ODH - otherwise fall back to the default domain value - we could consider even to have componentRoutes in the future Signed-off-by: Wen Zhou <[email protected]> (cherry picked from commit 757912c)
|
@zdtsw: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/test opendatahub-operator-rhoai-e2e |
use .spec.appsDomain if it is set
otherwise fall back to .spec.domain
Description
rework on #1318
How Has This Been Tested?
Screenshot or short clip
Merge criteria
E2E test suite update requirement
When bringing new changes to the operator code, such changes are by default required to be accompanied by extending and/or updating the E2E test suite accordingly.
To opt-out of this requirement:
E2E update requirement opt-out justificationsection belowE2E update requirement opt-out justification
unit test
Summary by CodeRabbit
New Features
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.