Skip to content

Commit 618a41b

Browse files
authored
Re-enable proxy_url (#4741)
Signed-off-by: Patrick Bänziger <[email protected]>
1 parent 6a8bf10 commit 618a41b

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* [CHANGE] Fix incorrectly named `cortex_cache_fetched_keys` and `cortex_cache_hits` metrics. Renamed to `cortex_cache_fetched_keys_total` and `cortex_cache_hits_total` respectively. #4686
1111
* [CHANGE] Enable Thanos series limiter in store-gateway. #4702
1212
* [CHANGE] Distributor: Apply `max_fetched_series_per_query` limit for `/series` API. #4683
13+
* [CHANGE] Re-enable the `proxy_url` option for receiver configuration. #4741
1314
* [FEATURE] Ruler: Add `external_labels` option to tag all alerts with a given set of labels. #4499
1415
* [FEATURE] Compactor: Add `-compactor.skip-blocks-with-out-of-order-chunks-enabled` configuration to mark blocks containing index with out-of-order chunks for no compact instead of halting the compaction. #4707
1516
* [FEATURE] Querier/Query-Frontend: Add `-querier.per-step-stats-enabled` and `-frontend.cache-queryable-samples-stats` configurations to enable query sample statistics. #4708

pkg/alertmanager/api.go

-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const (
4343
var (
4444
errPasswordFileNotAllowed = errors.New("setting password_file, bearer_token_file and credentials_file is not allowed")
4545
errOAuth2SecretFileNotAllowed = errors.New("setting OAuth2 client_secret_file is not allowed")
46-
errProxyURLNotAllowed = errors.New("setting proxy_url is not allowed")
4746
errTLSFileNotAllowed = errors.New("setting TLS ca_file, cert_file and key_file is not allowed")
4847
errSlackAPIURLFileNotAllowed = errors.New("setting Slack api_url_file and global slack_api_url_file is not allowed")
4948
errVictorOpsAPIKeyFileNotAllowed = errors.New("setting VictorOps api_key_file is not allowed")
@@ -410,9 +409,6 @@ func validateReceiverHTTPConfig(cfg commoncfg.HTTPClientConfig) error {
410409
if cfg.BearerTokenFile != "" {
411410
return errPasswordFileNotAllowed
412411
}
413-
if cfg.ProxyURL.URL != nil {
414-
return errProxyURLNotAllowed
415-
}
416412
if cfg.OAuth2 != nil && cfg.OAuth2.ClientSecretFile != "" {
417413
return errOAuth2SecretFileNotAllowed
418414
}

pkg/alertmanager/api_test.go

-16
Original file line numberDiff line numberDiff line change
@@ -371,22 +371,6 @@ alertmanager_config: |
371371
`,
372372
err: errors.Wrap(errOAuth2SecretFileNotAllowed, "error validating Alertmanager config"),
373373
},
374-
{
375-
name: "Should return error if receiver's HTTP proxy_url is set",
376-
cfg: `
377-
alertmanager_config: |
378-
receivers:
379-
- name: default-receiver
380-
webhook_configs:
381-
- url: http://localhost
382-
http_config:
383-
proxy_url: http://localhost
384-
385-
route:
386-
receiver: 'default-receiver'
387-
`,
388-
err: errors.Wrap(errProxyURLNotAllowed, "error validating Alertmanager config"),
389-
},
390374
{
391375
name: "Should return error if global slack_api_url_file is set",
392376
cfg: `

0 commit comments

Comments
 (0)