Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
randytqwjp committed Jan 9, 2025
1 parent 46d71a9 commit e41aab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/hpa/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ func (c *Service) IsHpaMetricAvailable(ctx context.Context, currenthpa *v2.Horiz
logger := log.FromContext(ctx)
if currenthpa == nil || reflect.DeepEqual(currenthpa.Status, v2.HorizontalPodAutoscalerStatus{}) || len(currenthpa.Status.Conditions) == 0 || len(currenthpa.Status.CurrentMetrics) == 0 {
// shouldn't reach here because, in this HPA unready case, the controller should stop the reconciliation at the point of fetching hpa.
logger.Error("unready HPA is passed to IsHpaMetricAvailable")
logger.Error(nil, "invalid container resource metric", "hpa", klog.KObj(currenthpa))
return false
}

Expand Down

0 comments on commit e41aab4

Please sign in to comment.