mirror of https://github.com/k3s-io/k3s
Fixed resource consumer to expose /metrics instead of /Metrics
parent
a9c7dfba51
commit
688e1d1053
|
@ -111,7 +111,7 @@ func consumeCPUResources(f *framework.Framework, consumerName string, cpuUsage i
|
||||||
func exportCustomMetricFromPod(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer {
|
func exportCustomMetricFromPod(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer {
|
||||||
podAnnotations := map[string]string{
|
podAnnotations := map[string]string{
|
||||||
"prometheus.io/scrape": "true",
|
"prometheus.io/scrape": "true",
|
||||||
"prometheus.io/path": "/Metrics",
|
"prometheus.io/path": "/metrics",
|
||||||
"prometheus.io/port": "8080",
|
"prometheus.io/port": "8080",
|
||||||
}
|
}
|
||||||
return common.NewMetricExporter(consumerName, f.Namespace.Name, podAnnotations, nil, metricValue, f.ClientSet, f.InternalClientset, f.ScalesGetter)
|
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 {
|
func exportCustomMetricFromService(f *framework.Framework, consumerName string, metricValue int) *common.ResourceConsumer {
|
||||||
serviceAnnotations := map[string]string{
|
serviceAnnotations := map[string]string{
|
||||||
"prometheus.io/scrape": "true",
|
"prometheus.io/scrape": "true",
|
||||||
"prometheus.io/path": "/Metrics",
|
"prometheus.io/path": "/metrics",
|
||||||
"prometheus.io/port": "8080",
|
"prometheus.io/port": "8080",
|
||||||
}
|
}
|
||||||
return common.NewMetricExporter(consumerName, f.Namespace.Name, nil, serviceAnnotations, metricValue, f.ClientSet, f.InternalClientset, f.ScalesGetter)
|
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"
|
ConsumeMemAddress = "/ConsumeMem"
|
||||||
BumpMetricAddress = "/BumpMetric"
|
BumpMetricAddress = "/BumpMetric"
|
||||||
GetCurrentStatusAddress = "/GetCurrentStatus"
|
GetCurrentStatusAddress = "/GetCurrentStatus"
|
||||||
MetricsAddress = "/Metrics"
|
MetricsAddress = "/metrics"
|
||||||
|
|
||||||
MillicoresQuery = "millicores"
|
MillicoresQuery = "millicores"
|
||||||
MegabytesQuery = "megabytes"
|
MegabytesQuery = "megabytes"
|
||||||
|
|
|
@ -128,7 +128,7 @@ var (
|
||||||
Porter = Config{e2eRegistry, "porter", "1.0"}
|
Porter = Config{e2eRegistry, "porter", "1.0"}
|
||||||
PortForwardTester = Config{e2eRegistry, "port-forward-tester", "1.0"}
|
PortForwardTester = Config{e2eRegistry, "port-forward-tester", "1.0"}
|
||||||
Redis = Config{e2eRegistry, "redis", "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"}
|
ResourceController = Config{e2eRegistry, "resource-consumer/controller", "1.0"}
|
||||||
ServeHostname = Config{e2eRegistry, "serve-hostname", "1.1"}
|
ServeHostname = Config{e2eRegistry, "serve-hostname", "1.1"}
|
||||||
TestWebserver = Config{e2eRegistry, "test-webserver", "1.0"}
|
TestWebserver = Config{e2eRegistry, "test-webserver", "1.0"}
|
||||||
|
|
Loading…
Reference in New Issue