Explorar o código

fix bug on current replicas

Alexander Belanger %!s(int64=4) %!d(string=hai) anos
pai
achega
86b2c17ecf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      internal/kubernetes/prometheus/metrics.go

+ 1 - 1
internal/kubernetes/prometheus/metrics.go

@@ -117,7 +117,7 @@ func QueryPrometheus(
 
 		query = createHPAAbsoluteMemoryThresholdQuery(metricName, podSelectionRegex, opts.Name, opts.Namespace, service.ObjectMeta.Labels["app"])
 	} else if opts.Metric == "hpa_replicas" {
-		metricName := getKubeHPAMetricName(clientset, service, opts, "current_replicas")
+		metricName := getKubeHPAMetricName(clientset, service, opts, "status_current_replicas")
 
 		query = createHPACurrentReplicasQuery(metricName, opts.Name, opts.Namespace, service.ObjectMeta.Labels["app"])
 	}