From cad8649fef468de3a4aa34ae2c88e5400bbb3532 Mon Sep 17 00:00:00 2001 From: Pavel Basov Date: Fri, 6 Dec 2024 17:13:39 +0100 Subject: [PATCH] Fix mothership alerting aggregation --- charts/motel-mothership/Chart.yaml | 2 +- charts/motel-mothership/templates/victoria/vmalert.yaml | 6 +++--- charts/motel-mothership/templates/victoria/vmcluster.yaml | 2 +- demo/cluster/aws-child.yaml | 2 +- demo/cluster/aws-regional.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/motel-mothership/Chart.yaml b/charts/motel-mothership/Chart.yaml index fbec5a6..1d0a051 100644 --- a/charts/motel-mothership/Chart.yaml +++ b/charts/motel-mothership/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: motel-mothership description: A Helm chart that deploys Grafana, Promxy, and VictoriaMetrics. -version: 0.1.4 +version: 0.1.5 appVersion: "1.0" dependencies: - name: grafana-operator diff --git a/charts/motel-mothership/templates/victoria/vmalert.yaml b/charts/motel-mothership/templates/victoria/vmalert.yaml index 484bb02..3d31997 100644 --- a/charts/motel-mothership/templates/victoria/vmalert.yaml +++ b/charts/motel-mothership/templates/victoria/vmalert.yaml @@ -7,7 +7,7 @@ metadata: spec: configMaps: [] datasource: - url: http://vmselect-cluster.mon.svc:8481/select/0/prometheus + url: http://{{ .Release.Name }}-promxy.{{ .Release.Namespace }}.svc:8082 evaluationInterval: 15s externalLabels: {} extraArgs: @@ -20,8 +20,8 @@ spec: - url: http://vmalertmanager-cluster-0.vmalertmanager-cluster.mon.svc:9093/ port: "8080" remoteRead: - url: {{ .Values.victoriametrics.vmalert.remoteRead | default "http://vmselect-cluster.mon.svc:8481/select/0/prometheus" }} + url: {{ .Values.victoriametrics.vmalert.remoteRead | default (printf "http://vmselect-cluster.%s.svc:8481/select/0/prometheus" .Release.Namespace) }} remoteWrite: - url: http://vminsert-cluster.mon.svc:8480/insert/0/prometheus/api/v1/write + url: http://vminsert-cluster.{{ .Release.Namespace }}.svc:8480/insert/0/prometheus/api/v1/write selectAllByDefault: true {{- end }} \ No newline at end of file diff --git a/charts/motel-mothership/templates/victoria/vmcluster.yaml b/charts/motel-mothership/templates/victoria/vmcluster.yaml index b353d57..a2e7c0a 100644 --- a/charts/motel-mothership/templates/victoria/vmcluster.yaml +++ b/charts/motel-mothership/templates/victoria/vmcluster.yaml @@ -17,7 +17,7 @@ spec: vmselect: cacheMountPath: /select-cache extraArgs: - vmalert.proxyURL: http://vmalert-cluster.mon.svc:8080/ + vmalert.proxyURL: http://vmalert-cluster.{{ .Release.Namespace }}.svc:8080/ image: tag: v1.105.0-cluster port: "8481" diff --git a/demo/cluster/aws-child.yaml b/demo/cluster/aws-child.yaml index 25108ce..f4fb723 100644 --- a/demo/cluster/aws-child.yaml +++ b/demo/cluster/aws-child.yaml @@ -22,7 +22,7 @@ spec: template: aws-standalone-cp-0-0-3 servicesPriority: 100 services: - - template: motel-child-0-1-0 + - template: motel-child-0-1-1 name: motel-child namespace: motel-child values: | diff --git a/demo/cluster/aws-regional.yaml b/demo/cluster/aws-regional.yaml index 3dcc95e..ef19f0e 100644 --- a/demo/cluster/aws-regional.yaml +++ b/demo/cluster/aws-regional.yaml @@ -33,7 +33,7 @@ spec: enabled: true - name: motel-regional namespace: motel - template: motel-regional-0-1-0 + template: motel-regional-0-1-1 values: | victoriametrics: vmauth: