From eb474c819e849df6265ea8bdc91b14f1bf51b1e8 Mon Sep 17 00:00:00 2001 From: Michael Schmid Date: Wed, 23 Dec 2020 17:57:18 -0500 Subject: [PATCH] fix switched active and standby host infos --- controllers/ingress_handler.go | 4 ++-- controllers/route_handler.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/ingress_handler.go b/controllers/ingress_handler.go index 565c846..dec3607 100644 --- a/controllers/ingress_handler.go +++ b/controllers/ingress_handler.go @@ -241,7 +241,7 @@ func (r *HostMigrationReconciler) KubernetesHandler(ctx context.Context, opLog l ingressScheme = "https://" } for _, rule := range ingress.Spec.Rules { - activeMigratedIngress = append(activeMigratedIngress, fmt.Sprintf("%s%s", ingressScheme, rule.Host)) + standbyMigratedIngress = append(standbyMigratedIngress, fmt.Sprintf("%s%s", ingressScheme, rule.Host)) } } for _, ingress := range migrateDestinationToSource.Items { @@ -285,7 +285,7 @@ func (r *HostMigrationReconciler) KubernetesHandler(ctx context.Context, opLog l ingressScheme = "https://" } for _, rule := range ingress.Spec.Rules { - standbyMigratedIngress = append(standbyMigratedIngress, fmt.Sprintf("%s%s", ingressScheme, rule.Host)) + activeMigratedIngress = append(activeMigratedIngress, fmt.Sprintf("%s%s", ingressScheme, rule.Host)) } } // wait a sec before updating the ingress diff --git a/controllers/route_handler.go b/controllers/route_handler.go index 8255176..bf47828 100644 --- a/controllers/route_handler.go +++ b/controllers/route_handler.go @@ -119,7 +119,7 @@ func (r *HostMigrationReconciler) OpenshiftHandler(ctx context.Context, opLog lo routeScheme = "https://" } } - activeMigratedRoutes = append(activeMigratedRoutes, fmt.Sprintf("%s%s", routeScheme, route.Spec.Host)) + standbyMigratedRoutes = append(standbyMigratedRoutes, fmt.Sprintf("%s%s", routeScheme, route.Spec.Host)) } for _, route := range migrateDestinationToSource.Items { // migrate these routes @@ -140,7 +140,7 @@ func (r *HostMigrationReconciler) OpenshiftHandler(ctx context.Context, opLog lo routeScheme = "https://" } } - standbyMigratedRoutes = append(standbyMigratedRoutes, fmt.Sprintf("%s%s", routeScheme, route.Spec.Host)) + activeMigratedRoutes = append(activeMigratedRoutes, fmt.Sprintf("%s%s", routeScheme, route.Spec.Host)) } // wait a sec before updating the routes checkInterval := time.Duration(1)