Change order of reconciler registration
@@ -102,22 +102,6 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Experiment")
os.Exit(1)
}
- if err = (&controllers.MetricReconciler{
- Client: mgr.GetClient(),
- Log: ctrl.Log.WithName("controllers").WithName("Metric"),
- Scheme: mgr.GetScheme(),
- }).SetupWithManager(mgr); err != nil {
- setupLog.Error(err, "unable to create controller", "controller", "Metric")
- os.Exit(1)
- }
- if err = (&controllers.PatchReconciler{
- Client: mgr.GetClient(),
- Log: ctrl.Log.WithName("controllers").WithName("Patch"),
- Scheme: mgr.GetScheme(),
- }).SetupWithManager(mgr); err != nil {
- setupLog.Error(err, "unable to create controller", "controller", "Patch")
- os.Exit(1)
- }
if err = (&controllers.ServerReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controllers").WithName("Server"),
@@ -135,6 +119,14 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Setup")
os.Exit(1)
}
+ if err = (&controllers.PatchReconciler{
+ Client: mgr.GetClient(),
+ Log: ctrl.Log.WithName("controllers").WithName("Patch"),
+ Scheme: mgr.GetScheme(),
+ }).SetupWithManager(mgr); err != nil {
+ setupLog.Error(err, "unable to create controller", "controller", "Patch")
+ os.Exit(1)
+ }
if err = (&controllers.TrialJobReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controllers").WithName("Trial"),
@@ -143,6 +135,14 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Trial")
os.Exit(1)
}
+ if err = (&controllers.MetricReconciler{
+ Client: mgr.GetClient(),
+ Log: ctrl.Log.WithName("controllers").WithName("Metric"),
+ Scheme: mgr.GetScheme(),
+ }).SetupWithManager(mgr); err != nil {
+ setupLog.Error(err, "unable to create controller", "controller", "Metric")
+ os.Exit(1)
+ }
if err = (&controllers.WaitReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controllers").WithName("Wait"),
