mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
Merge pull request #6845 from simonpasquier/fix-proxy-url-version-check
fix: allow proxy URL for all Prometheus versions
This commit is contained in:
commit
d78591c744
2 changed files with 4 additions and 3 deletions
pkg/prometheus
|
@ -578,12 +578,12 @@ func (cg *ConfigGenerator) addProxyConfigtoYaml(
|
|||
return cfg
|
||||
}
|
||||
|
||||
var cgProxyConfig = cg.WithMinimumVersion("2.43.0")
|
||||
|
||||
if proxyConfig.ProxyURL != nil {
|
||||
cfg = cgProxyConfig.AppendMapItem(cfg, "proxy_url", *proxyConfig.ProxyURL)
|
||||
cfg = cg.AppendMapItem(cfg, "proxy_url", *proxyConfig.ProxyURL)
|
||||
}
|
||||
|
||||
cgProxyConfig := cg.WithMinimumVersion("2.43.0")
|
||||
|
||||
if proxyConfig.NoProxy != nil {
|
||||
cfg = cgProxyConfig.AppendMapItem(cfg, "no_proxy", *proxyConfig.NoProxy)
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ global:
|
|||
prometheus_replica: $(POD_NAME)
|
||||
scrape_configs:
|
||||
- job_name: scrapeConfig/default/testscrapeconfig1
|
||||
proxy_url: http://no-proxy.com
|
||||
relabel_configs:
|
||||
- source_labels:
|
||||
- job
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue