Merge pull request #118173 from huiwq1990/feat-autoscale-variable

hpa: cleanup `currentReplicas` code
This commit is contained in:
Kubernetes Prow Robot
2023-07-02 23:00:50 -07:00
committed by GitHub

View File

@@ -819,7 +819,7 @@ func (a *HorizontalController) reconcileAutoscaler(ctx context.Context, hpaShare
rescale := true
logger := klog.FromContext(ctx)
if scale.Spec.Replicas == 0 && minReplicas != 0 {
if currentReplicas == 0 && minReplicas != 0 {
// Autoscaling is disabled for this resource
desiredReplicas = 0
rescale = false