Skip to content

Commit

Permalink
fix empty DescribedObject in hpa MetricStatus when object target type…
Browse files Browse the repository at this point in the history
… is AverageValue

Signed-off-by: mchtech <michu_an@126.com>
  • Loading branch information
mchtech committed Apr 26, 2024
1 parent ba05a8d commit 94e6235
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/podautoscaler/horizontal.go
Expand Up @@ -553,6 +553,7 @@ func (a *HorizontalController) computeStatusForObjectMetric(specReplicas, status
*status = autoscalingv2.MetricStatus{
Type: autoscalingv2.ObjectMetricSourceType,
Object: &autoscalingv2.ObjectMetricStatus{
DescribedObject: metricSpec.Object.DescribedObject,
Metric: autoscalingv2.MetricIdentifier{
Name: metricSpec.Object.Metric.Name,
Selector: metricSpec.Object.Metric.Selector,
Expand Down

0 comments on commit 94e6235

Please sign in to comment.