Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2044 reenable proxy_url #2050

Closed
wants to merge 1 commit into from

Conversation

supergicko
Copy link
Contributor

@supergicko supergicko commented Jun 8, 2022

What this PR does

It re-enables the proxy_url option for alertmanager receivers.

See #2044 and the related cortex PR: cortexproject/cortex#4741

Which issue(s) this PR fixes or relates to

Fixes #2044

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@CLAassistant
Copy link

CLAassistant commented Jun 8, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR. I prefer to keep it disallowed by default, but I'm open to add an "advanced" configuration option to enable it. The configuration option should be mentioned in the doc at docs/sources/operators-guide/securing/securing-alertmanager.md.

@supergicko supergicko force-pushed the 2044/reenable-proxyurl branch from a63f010 to fa5c527 Compare June 10, 2022 15:17
@supergicko
Copy link
Contributor Author

updated based on #2044 (comment)

Copy link
Contributor

@replay replay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution!

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Can you rebase main, please?

@@ -32,7 +32,7 @@
* [BUGFIX] Ring: fix bug where instances may appear unhealthy in the hash ring web UI even though they are not. #1933
* [BUGFIX] API: gzip is now enforced when identity encoding is explicitly rejected. #1864
* [BUGFIX] Fix panic at startup when Mimir is running in monolithic mode and query sharding is enabled. #2036

* [CHANGE] Re-enable the `proxy_url` option for receiver configuration. #2044
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments about this:

  1. Please link the PR number  #2050 instead of the issue one
  2. We're used to group CHANGELOG entries together, so CHANGE first, then FEATURE, then ENHANCEMENT and finally BUGFIX. See our contributing guidelines for more info: https://github.com/grafana/mimir/tree/main/docs/internal/contributing#changelog
  3. CHANGE is for breaking changes, but this is not a breaking change. ENHANCEMENT looks a better fit.

@@ -422,15 +422,9 @@ func validateReceiverHTTPConfig(cfg commoncfg.HTTPClientConfig) error {
if cfg.BearerTokenFile != "" {
return errPasswordFileNotAllowed
}
if cfg.ProxyURL.URL != nil {
return errProxyURLNotAllowed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we still using errProxyURLNotAllowed? I would have expected that variable to be removed too.

if cfg.OAuth2 != nil && cfg.OAuth2.ClientSecretFile != "" {
return errOAuth2SecretFileNotAllowed
}
if cfg.OAuth2 != nil && cfg.OAuth2.ProxyURL.URL != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier today I opened the PR #2076 to test the firewall works with cfg.ProxyURL.URL. Do think it's feasible to have a similar test on cfg.OAuth2.ProxyURL.URL too?

@pracucci
Copy link
Collaborator

pracucci commented Jul 5, 2022

This PR was mostly good. I'm taking over to get it through the finish line.

@pracucci pracucci mentioned this pull request Jul 5, 2022
3 tasks
@pracucci
Copy link
Collaborator

pracucci commented Jul 5, 2022

Superseeded by #2317.

@pracucci pracucci closed this Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable support for http proxy for alertmanager receivers
4 participants