Skip to content

Commit

Permalink
Ensure all list failures are logged.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miles-Garnsey committed May 20, 2024
1 parent 2456e37 commit 893c400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions controllers/medusa/medusabackupschedule_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func (r *MedusaBackupScheduleReconciler) Reconcile(ctx context.Context, req ctrl
if nextExecution.Before(now) {
if backupSchedule.Spec.ConcurrencyPolicy == batchv1.ForbidConcurrent {
if activeTasks, err := r.activeTasks(backupSchedule, dc); err != nil {
logger.V(1).Info("failed to get activeTasks", "error", err)
return ctrl.Result{}, err
} else {
if len(activeTasks) > 0 {
Expand Down
4 changes: 3 additions & 1 deletion controllers/replication/secret_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"
"sync"

"github.com/go-logr/logr"
"github.com/k8ssandra/k8ssandra-operator/pkg/secret"

coreapi "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1"
Expand Down Expand Up @@ -397,9 +398,10 @@ func (s *SecretSyncController) fetchAllMatchingSecrets(ctx context.Context, sele
return secrets.Items, nil
}

func (s *SecretSyncController) SetupWithManager(mgr ctrl.Manager, clusters []cluster.Cluster) error {
func (s *SecretSyncController) SetupWithManager(mgr ctrl.Manager, clusters []cluster.Cluster, logger logr.Logger) error {
err := s.initializeCache()
if err != nil {
logger.Info("Failed to initialize cache, error", err)
return err
}

Expand Down

0 comments on commit 893c400

Please sign in to comment.