mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	Fixed resource consumer to expose /metrics instead of /Metrics
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| 1.4 | ||||
| 1.5 | ||||
|   | ||||
| @@ -22,7 +22,7 @@ const ( | ||||
| 	ConsumeMemAddress       = "/ConsumeMem" | ||||
| 	BumpMetricAddress       = "/BumpMetric" | ||||
| 	GetCurrentStatusAddress = "/GetCurrentStatus" | ||||
| 	MetricsAddress          = "/Metrics" | ||||
| 	MetricsAddress          = "/metrics" | ||||
|  | ||||
| 	MillicoresQuery              = "millicores" | ||||
| 	MegabytesQuery               = "megabytes" | ||||
|   | ||||
| @@ -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"} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user