diff --git a/pkg/controller/ehpa/effective_hpa_controller.go b/pkg/controller/ehpa/effective_hpa_controller.go index 3b6f3b566..abb1f685f 100644 --- a/pkg/controller/ehpa/effective_hpa_controller.go +++ b/pkg/controller/ehpa/effective_hpa_controller.go @@ -130,14 +130,14 @@ func (c *EffectiveHPAController) Reconcile(ctx context.Context, req ctrl.Request updatedScale, err := c.ScaleClient.Scales(scale.Namespace).Update(ctx, mapping.Resource.GroupResource(), scale, metav1.UpdateOptions{}) if err != nil { c.Recorder.Event(ehpa, v1.EventTypeNormal, "FailedManualScale", err.Error()) - msg := fmt.Sprintf("Failed to manual scale target to specific replicas, ehpa %s replicas %d", klog.KObj(ehpa), ehpa.Spec.SpecificReplicas) + msg := fmt.Sprintf("Failed to manual scale target to specific replicas, ehpa %s replicas %d", klog.KObj(ehpa), *ehpa.Spec.SpecificReplicas) klog.Error(err, msg) setCondition(newStatus, autoscalingapi.Ready, metav1.ConditionFalse, "FailedScale", msg) c.UpdateStatus(ctx, ehpa, newStatus) return ctrl.Result{}, err } - klog.Infof("Manual scale target to specific replicas, ehpa %s replicas %d", klog.KObj(ehpa), ehpa.Spec.SpecificReplicas) + klog.Infof("Manual scale target to specific replicas, ehpa %s replicas %d", klog.KObj(ehpa), *ehpa.Spec.SpecificReplicas) now := metav1.Now() newStatus.LastScaleTime = &now newStatus.CurrentReplicas = &updatedScale.Status.Replicas