Skip to content

Commit

Permalink
Get PR 2050 through the finish line (#2317)
Browse files Browse the repository at this point in the history
* 2044 reenable proxy_url

* Removed unused variable errProxyURLNotAllowed

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Update PR number

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Update CHANGELOG.md

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Keep blocking OAuth2 HTTP proxy because it's not protected by our firewall

Signed-off-by: Marco Pracucci <marco@pracucci.com>

Co-authored-by: supergicko <kappel.christoph@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
  • Loading branch information
3 people committed Jul 5, 2022
1 parent e9c7566 commit fefeb62
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions pkg/alertmanager/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
18 changes: 0 additions & 18 deletions pkg/alertmanager/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ alertmanager_config: |
client_secret: xxx
token_url: http://example.com
proxy_url: http://example.com
route:
receiver: 'default-receiver'
receivers:
Expand Down Expand Up @@ -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'
`,
Expand Down

0 comments on commit fefeb62

Please sign in to comment.