Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#9419 from cnmcavoy/cnmcavoy/machin…
Browse files Browse the repository at this point in the history
…e-health-check-logging

🐛 Fix excessive trace logging in the machine health check controller
  • Loading branch information
k8s-ci-robot authored Sep 14, 2023
2 parents eb256f0 + 49c9525 commit d22aca0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (r *Reconciler) getTargetsFromMHC(ctx context.Context, logger logr.Logger,

targets := []healthCheckTarget{}
for k := range machines {
logger.WithValues("Machine", klog.KObj(&machines[k]))
logger := logger.WithValues("Machine", klog.KObj(&machines[k]))
skip, reason := shouldSkipRemediation(&machines[k])
if skip {
logger.Info("skipping remediation", "reason", reason)
Expand Down Expand Up @@ -286,7 +286,7 @@ func (r *Reconciler) healthCheckTargets(targets []healthCheckTarget, logger logr
var healthy []healthCheckTarget

for _, t := range targets {
logger = logger.WithValues("Target", t.string())
logger := logger.WithValues("Target", t.string())
logger.V(3).Info("Health checking target")
needsRemediation, nextCheck := t.needsRemediation(logger, timeoutForMachineToHaveNode)

Expand Down

0 comments on commit d22aca0

Please sign in to comment.