chore: Reorganize "Calculated desired replicas log fields (#1190)

So that `max` is emitted immediately after `min`, which is the counterpart of it.
This commit is contained in:
Yusuke Kuoka 2022-03-08 10:29:53 +09:00 committed by GitHub
parent 5b899f578b
commit 15ee6d6360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -572,6 +572,10 @@ func (r *HorizontalRunnerAutoscalerReconciler) computeReplicasWithCache(log logr
"min", minReplicas,
}
if maxReplicas := hra.Spec.MaxReplicas; maxReplicas != nil {
kvs = append(kvs, "max", *maxReplicas)
}
if cached != nil {
kvs = append(kvs, "cached", *cached)
}
@ -581,10 +585,6 @@ func (r *HorizontalRunnerAutoscalerReconciler) computeReplicasWithCache(log logr
kvs = append(kvs, "scale_down_delay_until", scaleDownDelayUntil)
}
if maxReplicas := hra.Spec.MaxReplicas; maxReplicas != nil {
kvs = append(kvs, "max", *maxReplicas)
}
log.V(1).Info(fmt.Sprintf("Calculated desired replicas of %d", newDesiredReplicas),
kvs...,
)