You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mirror OpenShift Route admission errors to OpenStackControlPlane conditions
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 <[email protected]>
0 commit comments