diff --git a/pkg/controller/delay.go b/pkg/controller/delay.go index c1443a9b0..da671a0f0 100644 --- a/pkg/controller/delay.go +++ b/pkg/controller/delay.go @@ -46,9 +46,12 @@ func checkScalingDelay(ctx context.Context, logger log.Logger, sts *v1.StatefulS } delay, prepareURL, err := parseDelayedDownscaleAnnotations(sts.GetAnnotations()) - if delay == 0 || prepareURL == nil || err != nil { + if err != nil { return currentReplicas, err } + if delay == 0 || prepareURL == nil { + return desiredReplicas, err + } if desiredReplicas >= currentReplicas { callCancelDelayedDownscale(ctx, logger, httpClient, createPrepareDownscaleEndpoints(sts.Namespace, sts.GetName(), 0, int(currentReplicas), prepareURL))