-
Notifications
You must be signed in to change notification settings - Fork 4
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
Point silence operator to mimir #318
Conversation
Signed-off-by: QuentinBisson <[email protected]>
548397a
to
8006b06
Compare
@@ -16,6 +16,7 @@ data: | |||
service: | |||
alertmanager: | |||
address: {{ .Values.alertmanagerAddress }} | |||
tenantId: anonymous |
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.
This value should be configurable via values
helm/silence-operator/values.yaml
Outdated
@@ -2,7 +2,7 @@ image: | |||
name: "giantswarm/silence-operator" | |||
tag: "[[ .Version ]]" | |||
|
|||
alertmanagerAddress: http://alertmanager-operated.monitoring.svc:9093 | |||
alertmanagerAddress: http://mimir-gateway.mimir.svc:8080/alertmanager |
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.
Let's not make this a default here, but instead use a placeholder
pkg/alertmanager/mimirclient.go
Outdated
) | ||
|
||
type httpClient struct { | ||
c http.Client |
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.
http.Client should rather be embedded in httpClient in order to avoid obfuscation of the client capabilities.
This would also prevent redefining all the client method done below.
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.
Sure that would be best but there's no way to call the do function of the http.client thought right?
|
||
func (t *customTransport) RoundTrip(req *http.Request) (*http.Response, error) { | ||
if t.tenantId != "" { | ||
req.Header.Add("X-Scope-OrgID", t.tenantId) |
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.
We use a transport to avoid overrding functions of the http client
@TheoBrigitte what do you think? |
Checklist