-
Notifications
You must be signed in to change notification settings - Fork 102
Mirror OpenShift Route admission errors to OpenStackControlPlane conditions #1648
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
Mirror OpenShift Route admission errors to OpenStackControlPlane conditions #1648
Conversation
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/77b0a89dbbed4f338dee884efaf6ddfe ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 17m 59s |
|
/test functional |
|
/retest |
abays
left a 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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abays, stuggi 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 |
|
/retest |
…itions Add route admission status checking to ensure that OpenStackControlPlane expose conditions (e.g., OpenStackControlPlaneExposeBarbicanReady) properly reflect errors from the underlying OpenShift Route objects. Previously, the expose conditions would be set based only on whether the route could be created, but would not reflect subsequent admission failures by the OpenShift router (e.g., hostname conflicts, invalid configurations). This could leave the condition in a misleading state where it appeared successful while the route was actually not admitted. Changes: - Add checkRouteAdmissionStatus() helper function to inspect route status.ingress[0].conditions for the "Admitted" condition - Update ensureRoute() to check route admission status after creation and update the condition accordingly - Add OpenStackControlPlaneExposeServiceReadyRouteAdmissionErrorMessage constant for clear error reporting - Set expose conditions to True only when routes are successfully admitted - Set expose conditions to False with detailed error messages when route admission fails This ensures that conditions like OpenStackControlPlaneExposeBarbicanReady, OpenStackControlPlaneExposeKeystoneAPIReady, etc. accurately reflect the actual state of the routes, making debugging easier for operators. The implementation handles edge cases gracefully: - Routes without ingress status yet (during initial creation) - Routes without admission conditions yet (still being processed) - Routes with failed admission (error is surfaced in the condition) - Routes successfully admitted (condition set to True) Note: RouteAdmitted (type "Admitted") is currently the only officially defined condition type in the OpenShift Route API (github.com/openshift/api). The implementation loops through all conditions to be future-proof for when additional condition types are added, but today it will only find the "Admitted" condition. Jira: https://issues.redhat.com/browse/OSPRH-8984 AssistedBy: cloude-4-sonnet Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
|
New changes are detected. LGTM label has been removed. |
494cb11
into
openstack-k8s-operators:main
Add route admission status checking to ensure that OpenStackControlPlane expose conditions (e.g., OpenStackControlPlaneExposeBarbicanReady) properly reflect errors from the underlying OpenShift Route objects.
Previously, the expose conditions would be set based only on whether the route could be created, but would not reflect subsequent admission failures by the OpenShift router (e.g., hostname conflicts, invalid configurations). This could leave the condition in a misleading state where it appeared successful while the route was actually not admitted.
Changes:
This ensures that conditions like OpenStackControlPlaneExposeBarbicanReady, OpenStackControlPlaneExposeKeystoneAPIReady, etc. accurately reflect the actual state of the routes, making debugging easier for operators.
The implementation handles edge cases gracefully:
Note: RouteAdmitted (type "Admitted") is currently the only officially defined condition type in the OpenShift Route API (github.com/openshift/api). The implementation loops through all conditions to be future-proof for when additional condition types are added, but today it will only find the "Admitted" condition.
Jira: https://issues.redhat.com/browse/OSPRH-8984
AssistedBy: cloude-4-sonnet