From 4c90467781d5445c708387beca9f06a46adda4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0tibran=C3=BD?= Date: Fri, 2 Feb 2024 10:55:50 +0100 Subject: [PATCH] Add log message when downscale delay is reached. --- pkg/controller/delay.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controller/delay.go b/pkg/controller/delay.go index c1ecdc3e4..e6acbf04a 100644 --- a/pkg/controller/delay.go +++ b/pkg/controller/delay.go @@ -49,7 +49,7 @@ func checkScalingDelay(ctx context.Context, logger log.Logger, sts *v1.StatefulS if desiredReplicas > currentReplicas { callCancelDelayedDownscale(ctx, logger, httpClient, createEndpoints(sts.Namespace, sts.GetName(), 0, int(currentReplicas), prepareURL)) - // Proceed even if calling cancel of delayed downscale fails. We call it repeatedly. + // Proceed even if calling cancel of delayed downscale fails. We call cancellation repeatedly, so it will happen during next reconcile. return nil } @@ -72,6 +72,7 @@ func checkScalingDelay(ctx context.Context, logger log.Logger, sts *v1.StatefulS } // We can proceed with downscale! + level.Info(logger).Log("msg", "downscale delay has been reached on all downscaled pods, proceeding with downscale", "name", sts.GetName(), "delay", delay, "elapsed", elapsedSinceMaxTime) return nil }