Skip to content

Commit

Permalink
route: Make sure router name is removed from cluster hostname in OCP …
Browse files Browse the repository at this point in the history
…4.8 (PROJQUAY-2306)

- Remove router name prefix from cluster hostname (this happens in OCP 4.8)
  • Loading branch information
jonathankingfc committed Aug 25, 2021
1 parent ba686da commit 654f2c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/quay/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func (r *QuayRegistryReconciler) checkRoutesAvailable(ctx *quaycontext.QuayRegis

if len(fakeRoute.(*routev1.Route).Status.Ingress) > 0 {
ctx.SupportsRoutes = true
ctx.ClusterHostname = fakeRoute.(*routev1.Route).Status.Ingress[0].RouterCanonicalHostname
routerName := fakeRoute.(*routev1.Route).Status.Ingress[0].RouterName
routerCanonicalHostname := fakeRoute.(*routev1.Route).Status.Ingress[0].RouterCanonicalHostname
ctx.ClusterHostname = strings.TrimPrefix(routerCanonicalHostname, "router-"+routerName+".")
r.Log.Info("Detected cluster hostname " + ctx.ClusterHostname)

return true, nil
}
Expand Down

0 comments on commit 654f2c5

Please sign in to comment.