@@ -124,17 +124,21 @@ func (c *RouteSyncController) Sync(ctx context.Context, controllerContext factor
124
124
}
125
125
routeConfig := routesub .NewRouteConfig (updatedOperatorConfig , ingressConfig , c .routeName )
126
126
127
+ typePrefix := fmt .Sprintf ("%sCustomRouteSync" , strings .Title (c .routeName ))
127
128
// try to sync the custom route first. If the sync fails for any reason, error
128
129
// out the sync loop and inform about this fact instead of putting default
129
130
// route into inaccessible state.
130
131
_ , customRouteErrReason , customRouteErr := c .SyncCustomRoute (ctx , routeConfig , controllerContext )
131
- statusHandler .AddConditions (status .HandleProgressingOrDegraded ("CustomRouteSync" , customRouteErrReason , customRouteErr ))
132
+ statusHandler .AddConditions (status .HandleProgressingOrDegraded (typePrefix , customRouteErrReason , customRouteErr ))
133
+ statusHandler .AddCondition (status .HandleUpgradable (typePrefix , customRouteErrReason , customRouteErr ))
132
134
if customRouteErr != nil {
133
135
return statusHandler .FlushAndReturn (customRouteErr )
134
136
}
135
137
138
+ typePrefix = fmt .Sprintf ("%sDefaultRouteSync" , strings .Title (c .routeName ))
136
139
_ , defaultRouteErrReason , defaultRouteErr := c .SyncDefaultRoute (ctx , routeConfig , ingressConfig , controllerContext )
137
- statusHandler .AddConditions (status .HandleProgressingOrDegraded ("DefaultRouteSync" , defaultRouteErrReason , defaultRouteErr ))
140
+ statusHandler .AddConditions (status .HandleProgressingOrDegraded (typePrefix , defaultRouteErrReason , defaultRouteErr ))
141
+ statusHandler .AddCondition (status .HandleUpgradable (typePrefix , defaultRouteErrReason , defaultRouteErr ))
138
142
139
143
// warn if deprecated configuration of custom domain for 'console' route is set on the console-operator config
140
144
if (len (operatorConfig .Spec .Route .Hostname ) != 0 || len (operatorConfig .Spec .Route .Secret .Name ) != 0 ) && c .routeName == api .OpenShiftConsoleRouteName {
0 commit comments