mirror of
https://github.com/prometheus/prometheus
synced 2024-12-23 06:53:25 +00:00
Add config tests for kuma SD
Signed-off-by: austin ce <austin.cawley@gmail.com>
This commit is contained in:
parent
0544bdd6af
commit
bbc951f50b
@ -48,6 +48,7 @@ import (
|
||||
"github.com/prometheus/prometheus/discovery/scaleway"
|
||||
"github.com/prometheus/prometheus/discovery/targetgroup"
|
||||
"github.com/prometheus/prometheus/discovery/triton"
|
||||
"github.com/prometheus/prometheus/discovery/xds"
|
||||
"github.com/prometheus/prometheus/discovery/zookeeper"
|
||||
"github.com/prometheus/prometheus/pkg/labels"
|
||||
"github.com/prometheus/prometheus/pkg/relabel"
|
||||
@ -439,6 +440,26 @@ var expectedConf = &Config{
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
JobName: "service-kuma",
|
||||
|
||||
HonorTimestamps: true,
|
||||
ScrapeInterval: model.Duration(15 * time.Second),
|
||||
ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
|
||||
|
||||
MetricsPath: DefaultScrapeConfig.MetricsPath,
|
||||
Scheme: DefaultScrapeConfig.Scheme,
|
||||
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
||||
|
||||
ServiceDiscoveryConfigs: discovery.Configs{
|
||||
&xds.KumaSDConfig{
|
||||
Server: "http://kuma-control-plane.kuma-system.svc:5676",
|
||||
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
||||
RefreshInterval: model.Duration(15 * time.Second),
|
||||
FetchTimeout: model.Duration(2 * time.Minute),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
JobName: "service-marathon",
|
||||
|
||||
|
6
config/testdata/conf.good.yml
vendored
6
config/testdata/conf.good.yml
vendored
@ -109,7 +109,6 @@ scrape_configs:
|
||||
- second.dns.address.domain.com
|
||||
- names:
|
||||
- first.dns.address.domain.com
|
||||
# refresh_interval defaults to 30s.
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [job]
|
||||
@ -193,6 +192,11 @@ scrape_configs:
|
||||
username: "myusername"
|
||||
password_file: valid_password_file
|
||||
|
||||
- job_name: service-kuma
|
||||
|
||||
kuma_sd_configs:
|
||||
- server: http://kuma-control-plane.kuma-system.svc:5676
|
||||
|
||||
- job_name: service-marathon
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
|
3
config/testdata/roundtrip.good.yml
vendored
3
config/testdata/roundtrip.good.yml
vendored
@ -106,6 +106,9 @@ scrape_configs:
|
||||
username: username
|
||||
password_file: valid_password_file
|
||||
|
||||
kuma_sd_configs:
|
||||
- server: http://kuma-control-plane.kuma-system.svc:5676
|
||||
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
- https://marathon.example.com:443
|
||||
|
Loading…
Reference in New Issue
Block a user