Skip to content

Commit

Permalink
avoid panic
Browse files Browse the repository at this point in the history
  • Loading branch information
googs1025 committed Jun 7, 2024
1 parent c62279d commit 46a3902
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
return ctrl.Result{}, err
}
if !valid {
log.V(2).Info("deleting follower pods for leader pod: %s", leaderPod.Name)
log.V(2).Info(fmt.Sprintf("deleting follower pods for leader pod: %s", leaderPod.Name))
return ctrl.Result{}, r.deleteFollowerPods(ctx, podList.Items)
}
return ctrl.Result{}, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhooks/pod_admission_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (p *podWebhook) leaderPodScheduled(ctx context.Context, pod *corev1.Pod) (b
}
scheduled := leaderPod.Spec.NodeName != ""
if !scheduled {
log.V(2).Info("leader pod %s is not yet scheduled", leaderPod.Name)
log.V(2).Info(fmt.Sprintf("leader pod %s is not yet scheduled", leaderPod.Name))
}
return scheduled, nil
}
Expand Down

0 comments on commit 46a3902

Please sign in to comment.