Merge pull request #72407 from aespejel/fix_resource_consumer_metrics_endpoint

Fixed /metrics endpoint for resource consumer
pull/564/head
Kubernetes Prow Robot 2019-02-05 12:08:49 -08:00 committed by GitHub
commit 3f933ec7c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ func consumeCPUResources(f *framework.Framework, consumerName string, cpuUsage i
func exportCustomMetricFromPod(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer {
podAnnotations := map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/path": "/Metrics",
"prometheus.io/path": "/metrics",
"prometheus.io/port": "8080",
}
return common.NewMetricExporter(consumerName, f.Namespace.Name, podAnnotations, nil, metricValue, f.ClientSet, f.InternalClientset, f.ScalesGetter)
@ -120,7 +120,7 @@ func exportCustomMetricFromPod(f *framework.Framework, consumerName string, metr
func exportCustomMetricFromService(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer {
serviceAnnotations := map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/path": "/Metrics",
"prometheus.io/path": "/metrics",
"prometheus.io/port": "8080",
}
return common.NewMetricExporter(consumerName, f.Namespace.Name, nil, serviceAnnotations, metricValue, f.ClientSet, f.InternalClientset, f.ScalesGetter)

View File

@ -1 +1 @@
1.4
1.5

View File

@ -22,7 +22,7 @@ const (
ConsumeMemAddress = "/ConsumeMem"
BumpMetricAddress = "/BumpMetric"
GetCurrentStatusAddress = "/GetCurrentStatus"
MetricsAddress = "/Metrics"
MetricsAddress = "/metrics"
MillicoresQuery = "millicores"
MegabytesQuery = "megabytes"

View File

@ -128,7 +128,7 @@ var (
Porter = Config{e2eRegistry, "porter", "1.0"}
PortForwardTester = Config{e2eRegistry, "port-forward-tester", "1.0"}
Redis = Config{e2eRegistry, "redis", "1.0"}
ResourceConsumer = Config{e2eRegistry, "resource-consumer", "1.4"}
ResourceConsumer = Config{e2eRegistry, "resource-consumer", "1.5"}
ResourceController = Config{e2eRegistry, "resource-consumer/controller", "1.0"}
ServeHostname = Config{e2eRegistry, "serve-hostname", "1.1"}
TestWebserver = Config{e2eRegistry, "test-webserver", "1.0"}