asD
Some checks failed
Lint / Run on Ubuntu (push) Failing after 52s
Tests / Run on Ubuntu (push) Successful in 4m50s
E2E Tests / Run on Ubuntu (push) Successful in 8m49s

This commit is contained in:
Chris Richardson
2025-05-13 08:13:01 -04:00
parent a229c7cf59
commit 8975a54ec6
3 changed files with 10 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package controller
import (
"context"
locustCluster "git.lilpenguins.com/crichardson/locust-operator/api/v1alpha1"
"github.com/go-logr/logr"
)

View File

@@ -2,8 +2,9 @@ package controller
import (
"fmt"
"sigs.k8s.io/controller-runtime/pkg/client"
"time"
"sigs.k8s.io/controller-runtime/pkg/client"
)
const (

View File

@@ -70,9 +70,14 @@ func (r *LocustClusterReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
podList, err := r.IsLeaderUp(log, locustCluster, ctx)
if err != nil {
return ctrl.Result{Requeue: true}, err
}
r.CreateUpdateLeader(log, locustCluster, ctx, podList)
err = r.CreateUpdateLeader(log, locustCluster, ctx, podList)
if err != nil {
return ctrl.Result{Requeue: true}, err
}
return ctrl.Result{}, nil
}