mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Merge pull request #118173 from huiwq1990/feat-autoscale-variable
hpa: cleanup `currentReplicas` code
This commit is contained in:
commit
0a82bdbfdb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user