-
Notifications
You must be signed in to change notification settings - Fork 541
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
ruler: Support OAuth2 and proxies in Alertmanager client #9945
Conversation
Still in draft state as I finalize testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
1499f5b
to
1be45db
Compare
pkg/ruler/notifier.go
Outdated
ClientID string `yaml:"client_id"` | ||
ClientSecret flagext.Secret `yaml:"client_secret"` | ||
TokenURL string `yaml:"token_url"` | ||
Scopes flagext.StringSlice `yaml:"scopes,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Moving this to StringSliceCSV. Nearly every other field that behaves this way across the project uses the CSV version, the regular version looks like it doesn't work as cleanly.
per discussion we said we would leave adding the support for specifying token audience via client credentials config |
What this PR does
The AM client already supports several TLS options + basic auth for talking to Alertmanager.
Extend this to also support OAuth2 Client Credentials Workflow, plus a URL for talking to the Alertmanager through a proxy.
These are all supported in upstream Prometheus's Alertmanager client: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config
via `http_config: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config
Supports HTTP, HTTP with CONNECT, or SOCKS5 proxies per https://pkg.go.dev/net/http#Transport. Under the hood,
prometheus/common
doesn't implement anything special for proxies and just wires the configuration up tohttp.Transport
's proxy (1, 2)Which issue(s) this PR fixes or relates to
n/a
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.