From f428705ec634393fc33d0b95df5c4060e956e6b4 Mon Sep 17 00:00:00 2001 From: Piotr Betkier Date: Wed, 27 Jul 2022 14:54:41 +0200 Subject: [PATCH] Fix comment in HPA's scale event replicaChange The field replicaChange in timestampedScaleEvent was wrongly described as either positive or negative depending on the scale direction. In fact the change is set as unsigned, positive or 0 even for downscales. --- pkg/controller/podautoscaler/horizontal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index ff5e960f687..c7f8082a404 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -62,7 +62,7 @@ type timestampedRecommendation struct { } type timestampedScaleEvent struct { - replicaChange int32 // positive for scaleUp, negative for scaleDown + replicaChange int32 // absolute value, non-negative timestamp time.Time outdated bool }