Skip to content

Commit

Permalink
Merge pull request #598 from googs1025/fix_log
Browse files Browse the repository at this point in the history
avoid log panic
  • Loading branch information
k8s-ci-robot authored Jun 7, 2024
2 parents 4093bad + 46a3902 commit c270059
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 c270059

Please sign in to comment.