mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-29 05:22:37 +00:00
hpa: cleanup currentReplicas
code
Signed-off-by: huiwq1990 <huiwq1990@163.com>
This commit is contained in:
parent
6356023cb4
commit
048938f1d8
@ -819,7 +819,7 @@ func (a *HorizontalController) reconcileAutoscaler(ctx context.Context, hpaShare
|
|||||||
rescale := true
|
rescale := true
|
||||||
logger := klog.FromContext(ctx)
|
logger := klog.FromContext(ctx)
|
||||||
|
|
||||||
if scale.Spec.Replicas == 0 && minReplicas != 0 {
|
if currentReplicas == 0 && minReplicas != 0 {
|
||||||
// Autoscaling is disabled for this resource
|
// Autoscaling is disabled for this resource
|
||||||
desiredReplicas = 0
|
desiredReplicas = 0
|
||||||
rescale = false
|
rescale = false
|
||||||
|
Loading…
Reference in New Issue
Block a user