Skip to content

Commit

Permalink
helm: expose /multitenant_alertmanager/configs endpoint (grafana#8248)
Browse files Browse the repository at this point in the history
This is part of grafana#6025.
  • Loading branch information
armandgrillet authored and narqo committed Jun 6, 2024
1 parent 5e420b3 commit c7d7d9e
Show file tree
Hide file tree
Showing 21 changed files with 86 additions and 1 deletion.
5 changes: 4 additions & 1 deletion development/common/config/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ http {
location = /multitenant_alertmanager/status {
proxy_pass http://${ALERT_MANAGER_HOST}$request_uri;
}
location = /multitenant_alertmanager/configs {
proxy_pass http://${ALERT_MANAGER_HOST}$request_uri;
}
location = /api/v1/alerts {
proxy_pass http://${ALERT_MANAGER_HOST}$request_uri;
}
Expand All @@ -75,7 +78,7 @@ http {
location /prometheus/api/v1/rules {
proxy_pass http://${RULER_HOST}$request_uri;
}

location /prometheus/api/v1/alerts {
proxy_pass http://${RULER_HOST}$request_uri;
}
Expand Down
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [ENHANCEMENT] Smoke-test: Parameterized `backoffLimit` for smoke tests in Helm chart to accommodate slower startup environments like k3d. #8025
* [ENHANCEMENT] Add a volumeClaimTemplates section to the `chunks-cache`, `index-cache`, `metadata-cache`, and `results-cache` components. #8016
* [BUGFIX] Helm: Allowed setting static NodePort for nginx gateway via `gateway.service.nodePort`. #6966
* [BUGFIX] Helm: Expose AM configs in the `gateway` NGINX configuration. #8248

## 5.3.0

Expand Down
9 changes: 9 additions & 0 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2983,6 +2983,10 @@ nginx:
set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};
proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};
proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
}
location = /api/v1/alerts {
set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};
proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
Expand Down Expand Up @@ -3047,6 +3051,7 @@ ingress:
alertmanager-headless:
- path: /alertmanager
- path: /multitenant_alertmanager/status
- path: /multitenant_alertmanager/configs
- path: /api/v1/alerts
ruler:
- path: /prometheus/config/v1/rules
Expand Down Expand Up @@ -3385,6 +3390,10 @@ gateway:
set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};
proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};
proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
}
location = /api/v1/alerts {
set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};
proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ data:
set $alertmanager gateway-nginx-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager gateway-nginx-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager gateway-nginx-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager keda-autoscaling-global-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager keda-autoscaling-global-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager keda-autoscaling-global-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager keda-autoscaling-metamonitoring-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager keda-autoscaling-metamonitoring-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager keda-autoscaling-metamonitoring-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager keda-autoscaling-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager keda-autoscaling-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager keda-autoscaling-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager large-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager large-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager large-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager metamonitoring-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager metamonitoring-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager metamonitoring-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager scheduler-name-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager scheduler-name-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager scheduler-name-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager small-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager small-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager small-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ spec:
name: test-ingress-values-mimir-alertmanager-headless
port:
number: 8080
- path: /multitenant_alertmanager/configs
pathType: Prefix
backend:
service:
name: test-ingress-values-mimir-alertmanager-headless
port:
number: 8080
- path: /api/v1/alerts
pathType: Prefix
backend:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-ingress-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-ingress-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-ingress-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-oss-k8s-1.25-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-oss-k8s-1.25-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-oss-k8s-1.25-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-oss-logical-multizone-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-oss-logical-multizone-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-oss-logical-multizone-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-oss-multizone-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-oss-multizone-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-oss-multizone-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-oss-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-oss-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-oss-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-requests-and-limits-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-requests-and-limits-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-requests-and-limits-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ data:
set $alertmanager test-vault-agent-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /multitenant_alertmanager/configs {
set $alertmanager test-vault-agent-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
}
location = /api/v1/alerts {
set $alertmanager test-vault-agent-values-mimir-alertmanager-headless.citestns.svc.cluster.local.;
proxy_pass http://$alertmanager:8080$request_uri;
Expand Down
1 change: 1 addition & 0 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, api

a.indexPage.AddLinks(defaultWeight, "Alertmanager", []IndexPageLink{
{Desc: "Status", Path: "/multitenant_alertmanager/status"},
{Desc: "Status", Path: "/multitenant_alertmanager/configs"},
{Desc: "Ring status", Path: "/multitenant_alertmanager/ring"},
{Desc: "Alertmanager", Path: "/alertmanager"},
})
Expand Down

0 comments on commit c7d7d9e

Please sign in to comment.