-
Notifications
You must be signed in to change notification settings - Fork 428
OCPBUGS-70147: skip HCP router LB when routes use apps domain #7418
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: release-4.20
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
|
@celebdor: This pull request references Jira Issue OCPBUGS-70147, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
/area hypershift/control-plane-operator |
|
@celebdor: The label(s) DetailsIn response to this:
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. |
When a HostedControlPlane uses Route publishing strategy with hostnames that are subdomains of the management cluster's default ingress domain (e.g., oauth.apps.example.com under apps.example.com), the HCP router LoadBalancer service should not be created. The management cluster's ingress controller can directly handle these routes. This fix introduces DNS label-based subdomain checking via IsSubdomain() to properly detect when route hostnames fall within the apps domain. The UseHCPRouter() function is now exported from the router component and checks: 1. Shared ingress mode (always skip router) 2. IBMCloud platform (always skip router) 3. Private/PublicAndPrivate HCPs (need router for internal routes) 4. Public HCPs with external DNS hostnames (need router) 5. Public HCPs with apps domain hostnames (skip router) The fix also adds DefaultIngressDomain to ControlPlaneContext and WorkloadContext structs to make the domain available to component predicates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
e3ae87a to
b6d522f
Compare
|
@celebdor: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: celebdor, muraee 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 |
|
/verified by @heliubj18 |
|
@heliubj18: This PR has been marked as verified by DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
What this PR does / why we need it:
Fix regression in 4.19 where HCP router LoadBalancer service was created unexpectedly for configurations using Route hostnames under the management cluster's apps domain.
After upgrading HCP clusters from 4.18 to 4.19, a
routerservice of type LoadBalancer is created unexpectedly. On platforms with limited LoadBalancer IPs (e.g., BareMetal with exhausted MetalLB IPAddressPool), the service stays in<pending>state and blocks the upgrade.The fix for OCPBUGS-56914 (PR #6780) changed the condition for creating the public router service from checking only if KAS uses Route to checking if ANY service uses Route with hostname. This caused the router service to be created for configurations that previously didn't need it.
This PR adds
IsPublicWithExternalDNS()function that checks if any service uses a Route with a hostname that is external to the management cluster's default ingress domain. When hostnames are subdomains of the apps domain (e.g.,oauth.apps.mgmt-cluster.example.com), the management cluster's default router can serve them via wildcard DNS, so no dedicated HCP router LoadBalancer service is needed.This preserves the OCPBUGS-56914 fix for external DNS users while preventing unnecessary router service creation for apps-domain routes.
Which issue(s) this PR fixes:
Fixes OCPBUGS-70147
Checklist
🤖 Generated with Claude Code via
/jira:solve OCPBUGS-70147 celebdor