Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from amazeeio/switched-active-standby-host
Browse files Browse the repository at this point in the history
fix switched active and standby host infos
  • Loading branch information
Schnitzel authored Dec 30, 2020
2 parents 68b32e5 + eb474c8 commit 51e76ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controllers/ingress_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions controllers/route_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 51e76ec

Please sign in to comment.