Skip to content

Commit

Permalink
ruler: Register custom discovery config
Browse files Browse the repository at this point in the history
Signed-off-by: Arve Knudsen <[email protected]>
  • Loading branch information
aknuds1 committed Nov 28, 2024
1 parent fb07ed6 commit 5ec75cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/ruler/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ func (c dnsServiceDiscovery) resolve(ctx context.Context) ([]*targetgroup.Group,
}

func dnsSD(rulerConfig *Config, resolver cache.AddressProvider, qType dns.QType, url *url.URL, rmi discovery.RefreshMetricsInstantiator) discovery.Config {
return dnsServiceDiscovery{
sd := dnsServiceDiscovery{
Resolver: resolver,
RefreshInterval: rulerConfig.AlertmanagerRefreshInterval,
Host: url.Host,
QType: qType,
refreshMetrics: rmi,
}
discovery.RegisterConfig(sd)
return sd
}

func staticTarget(url *url.URL) discovery.Config {
Expand Down

0 comments on commit 5ec75cd

Please sign in to comment.