Commit a8c58bcd authored by Andrei Zhlobich's avatar Andrei Zhlobich

Fix updating 'currentMetrics' field for HPA with 'AverageValue' target

parent 9f75e034
......@@ -373,7 +373,7 @@ func (a *HorizontalController) computeStatusForResourceMetric(currentReplicas in
return 0, time.Time{}, "", fmt.Errorf("failed to get %s utilization: %v", metricSpec.Resource.Name, err)
}
metricNameProposal := fmt.Sprintf("%s resource", metricSpec.Resource.Name)
status = &autoscalingv2.MetricStatus{
*status = autoscalingv2.MetricStatus{
Type: autoscalingv2.ResourceMetricSourceType,
Resource: &autoscalingv2.ResourceMetricStatus{
Name: metricSpec.Resource.Name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment