diff --git a/CHANGELOG.md b/CHANGELOG.md index 934ab970b32..1d606e53323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * [CHANGE] Compactor: delete source and output blocks from local disk on compaction failed, to reduce likelihood that subsequent compactions fail because of no space left on disk. #2261 * [CHANGE] Ruler: Remove unused CLI flags `-ruler.search-pending-for` and `-ruler.flush-period` (and their respective YAML config options). #2288 +* [ENHANCEMENT] Alertmanager: Allow the HTTP `proxy_url` configuration option in the receiver's configuration. #2317 * [BUGFIX] Compactor: log the actual error on compaction failed. #2261 ### Mixin diff --git a/pkg/alertmanager/api.go b/pkg/alertmanager/api.go index 95cc98a2541..7ed93454b73 100644 --- a/pkg/alertmanager/api.go +++ b/pkg/alertmanager/api.go @@ -422,9 +422,6 @@ func validateReceiverHTTPConfig(cfg commoncfg.HTTPClientConfig) error { if cfg.BearerTokenFile != "" { return errPasswordFileNotAllowed } - if cfg.ProxyURL.URL != nil { - return errProxyURLNotAllowed - } if cfg.OAuth2 != nil && cfg.OAuth2.ClientSecretFile != "" { return errOAuth2SecretFileNotAllowed } diff --git a/pkg/alertmanager/api_test.go b/pkg/alertmanager/api_test.go index 7b8b8f7eb12..23db41f10ee 100644 --- a/pkg/alertmanager/api_test.go +++ b/pkg/alertmanager/api_test.go @@ -317,7 +317,6 @@ alertmanager_config: | client_secret: xxx token_url: http://example.com proxy_url: http://example.com - route: receiver: 'default-receiver' receivers: @@ -428,23 +427,6 @@ alertmanager_config: | token_url: http://example.com client_secret: xxx proxy_url: http://localhost - - route: - receiver: 'default-receiver' -`, - err: errors.Wrap(errProxyURLNotAllowed, "error validating Alertmanager config"), - }, - { - name: "Should return error if receiver's HTTP proxy_url is set", - cfg: ` -alertmanager_config: | - receivers: - - name: default-receiver - webhook_configs: - - url: http://localhost - http_config: - proxy_url: http://localhost - route: receiver: 'default-receiver' `,