Skip to content

Commit 914d28b

Browse files
jhadvigopenshift-cherrypick-robot
authored andcommitted
OCPBUGS-2783: Distinguish between route conditions and remove the old ones
1 parent bb87c59 commit 914d28b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

pkg/console/controllers/route/controller.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,21 @@ func (c *RouteSyncController) Sync(ctx context.Context, controllerContext factor
124124
}
125125
routeConfig := routesub.NewRouteConfig(updatedOperatorConfig, ingressConfig, c.routeName)
126126

127+
typePrefix := fmt.Sprintf("%sCustomRouteSync", strings.Title(c.routeName))
127128
// try to sync the custom route first. If the sync fails for any reason, error
128129
// out the sync loop and inform about this fact instead of putting default
129130
// route into inaccessible state.
130131
_, 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))
132134
if customRouteErr != nil {
133135
return statusHandler.FlushAndReturn(customRouteErr)
134136
}
135137

138+
typePrefix = fmt.Sprintf("%sDefaultRouteSync", strings.Title(c.routeName))
136139
_, 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))
138142

139143
// warn if deprecated configuration of custom domain for 'console' route is set on the console-operator config
140144
if (len(operatorConfig.Spec.Route.Hostname) != 0 || len(operatorConfig.Spec.Route.Secret.Name) != 0) && c.routeName == api.OpenShiftConsoleRouteName {

pkg/console/starter/starter.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,15 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
403403
// "FooDegraded",
404404
//
405405
// in 4.8 we removed DonwloadsDeploymentSyncDegraded and can remove this in 4.9
406-
"DonwloadsDeploymentSyncDegraded",
406+
// "DonwloadsDeploymentSyncDegraded",
407407
// in 4.9 we replaced DefaultIngressCertValidation with OAuthServingCertValidation and can remove this in 4.10
408-
"DefaultIngressCertValidation",
408+
// "DefaultIngressCertValidation",
409+
// in 4.13 we are removing CustomRouteSync and DefaultRouteSync
410+
// we are need to backport the removal of these conditions all the way down to 4.10
411+
// since we only remove the in https://github.com/openshift/console-operator/pull/662
412+
// and its cause upgrade issues to the customers
413+
"CustomRouteSync",
414+
"DefaultRouteSync",
409415
},
410416
operatorClient,
411417
controllerContext.EventRecorder,

0 commit comments

Comments
 (0)