From f462b4be17787789bcd10925f3ff5a154de075b8 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Fri, 18 Dec 2020 11:56:21 +1100 Subject: [PATCH] use the correct namespace for checking secrets and services --- controllers/ingress_handler.go | 4 ++-- controllers/ingressmigrate_controller.go | 4 ++-- controllers/route_handler.go | 2 +- controllers/routemigrate_controller.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/controllers/ingress_handler.go b/controllers/ingress_handler.go index c55cf48..565c846 100644 --- a/controllers/ingress_handler.go +++ b/controllers/ingress_handler.go @@ -145,7 +145,7 @@ func (r *HostMigrationReconciler) KubernetesHandler(ctx context.Context, opLog l &dioscuri, ingressDestinationToSource, migrateDestinationToSource, - destinationNamespace, + sourceNamespace, ); err != nil { r.updateKubernetesStatusCondition(ctx, &dioscuri, @@ -180,7 +180,7 @@ func (r *HostMigrationReconciler) KubernetesHandler(ctx context.Context, opLog l if err := r.checkSecrets(ctx, &dioscuri, ingressDestinationToSource, - destinationNamespace, + sourceNamespace, ); err != nil { r.updateKubernetesStatusCondition(ctx, &dioscuri, diff --git a/controllers/ingressmigrate_controller.go b/controllers/ingressmigrate_controller.go index deeefde..ea547da 100644 --- a/controllers/ingressmigrate_controller.go +++ b/controllers/ingressmigrate_controller.go @@ -206,7 +206,7 @@ func (r *IngressMigrateReconciler) Reconcile(req ctrl.Request) (ctrl.Result, err &dioscuri, ingressDestinationToSource, migrateDestinationToSource, - destinationNamespace, + sourceNamespace, ); err != nil { r.updateStatusCondition(ctx, &dioscuri, @@ -241,7 +241,7 @@ func (r *IngressMigrateReconciler) Reconcile(req ctrl.Request) (ctrl.Result, err if err := r.checkSecrets(ctx, &dioscuri, ingressDestinationToSource, - destinationNamespace, + sourceNamespace, ); err != nil { r.updateStatusCondition(ctx, &dioscuri, diff --git a/controllers/route_handler.go b/controllers/route_handler.go index cd000e2..8255176 100644 --- a/controllers/route_handler.go +++ b/controllers/route_handler.go @@ -96,7 +96,7 @@ func (r *HostMigrationReconciler) OpenshiftHandler(ctx context.Context, opLog lo migrateSourceToDestination := &routev1.RouteList{} r.checkServices(&dioscuri, routesSourceToDestination, migrateSourceToDestination, destinationNamespace) migrateDestinationToSource := &routev1.RouteList{} - r.checkServices(&dioscuri, routesDestinationToSource, migrateDestinationToSource, destinationNamespace) + r.checkServices(&dioscuri, routesDestinationToSource, migrateDestinationToSource, sourceNamespace) // END CHECKING SERVICES SECTION // START MIGRATING ROUTES SECTION // actually start the migrations here diff --git a/controllers/routemigrate_controller.go b/controllers/routemigrate_controller.go index 6972ca2..592e98b 100644 --- a/controllers/routemigrate_controller.go +++ b/controllers/routemigrate_controller.go @@ -154,7 +154,7 @@ func (r *RouteMigrateReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error migrateSourceToDestination := &routev1.RouteList{} r.checkServices(&dioscuri, routesSourceToDestination, migrateSourceToDestination, destinationNamespace) migrateDestinationToSource := &routev1.RouteList{} - r.checkServices(&dioscuri, routesDestinationToSource, migrateDestinationToSource, destinationNamespace) + r.checkServices(&dioscuri, routesDestinationToSource, migrateDestinationToSource, sourceNamespace) // END CHECKING SERVICES SECTION // START MIGRATING ROUTES SECTION // actually start the migrations here