Skip to content

Commit 99f128f

Browse files
committed
Stop adding the current object to the logger in webhooks
Signed-off-by: Stefan Büringer [email protected]
1 parent f46cfa5 commit 99f128f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

api/v1beta1/machinedeployment_webhook.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"k8s.io/apimachinery/pkg/util/intstr"
3232
"k8s.io/apimachinery/pkg/util/validation"
3333
"k8s.io/apimachinery/pkg/util/validation/field"
34-
"k8s.io/klog/v2"
3534
"k8s.io/utils/pointer"
3635
ctrl "sigs.k8s.io/controller-runtime"
3736
"sigs.k8s.io/controller-runtime/pkg/webhook"
@@ -300,8 +299,7 @@ func calculateMachineDeploymentReplicas(ctx context.Context, oldMD *MachineDeplo
300299
return *newMD.Spec.Replicas, nil
301300
}
302301

303-
// TODO(sbueringer): drop this with the next CR version that adds the MD key automatically.
304-
log := ctrl.LoggerFrom(ctx).WithValues("MachineDeployment", klog.KObj(newMD))
302+
log := ctrl.LoggerFrom(ctx)
305303

306304
// If both autoscaler annotations are set, use them to calculate the default value.
307305
minSizeString, hasMinSizeAnnotation := newMD.Annotations[AutoscalerMinSizeAnnotation]

0 commit comments

Comments
 (0)