From 57e90b700ff54ba04a9de072fd789c7103a453c8 Mon Sep 17 00:00:00 2001 From: klinch0 <68821526+klinch0@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:59:28 +0300 Subject: [PATCH] fix alerta webhook url (#457) ## Summary by CodeRabbit - **New Features** - Updated monitoring application version to 1.5.1, enhancing overall stability. - Introduced a new API key handling mechanism for improved security. - Enhanced Ingress resource configurability with dynamic URL construction. - **Bug Fixes** - Adjusted formatting for Ingress annotations to ensure proper functionality. - **Chores** - Updated version mappings for the monitoring package in the versions map. --- packages/extra/monitoring/Chart.yaml | 2 +- packages/extra/monitoring/templates/alerta/alerta.yaml | 8 ++++---- packages/extra/versions_map | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/extra/monitoring/Chart.yaml b/packages/extra/monitoring/Chart.yaml index 41b097473..b3c88fc20 100644 --- a/packages/extra/monitoring/Chart.yaml +++ b/packages/extra/monitoring/Chart.yaml @@ -3,4 +3,4 @@ name: monitoring description: Monitoring and observability stack icon: /logos/monitoring.svg type: application -version: 1.5.0 +version: 1.5.1 diff --git a/packages/extra/monitoring/templates/alerta/alerta.yaml b/packages/extra/monitoring/templates/alerta/alerta.yaml index 87d408f5d..928acb821 100644 --- a/packages/extra/monitoring/templates/alerta/alerta.yaml +++ b/packages/extra/monitoring/templates/alerta/alerta.yaml @@ -36,7 +36,7 @@ data: 'endpoint' : "/api", 'provider' : "basic" }) - .constant('colors', {}); + .constant('colors', {}); --- apiVersion: v1 kind: Service @@ -115,7 +115,7 @@ spec: - name: TELEGRAM_TOKEN value: "{{ .Values.alerta.alerts.telegram.token }}" - name: TELEGRAM_WEBHOOK_URL - value: "https://alerta.infra.aenix.org/api/webhooks/telegram?api-key={{ $apiKey }}" + value: "https://{{ printf "alerta.%s" (.Values.host | default $host) }}/api/webhooks/telegram?api-key={{ $apiKey }}" {{- end }} ports: @@ -148,9 +148,9 @@ metadata: labels: app: alerta annotations: - {{- if ne $issuerType "cloudflare" }} + {{- if ne $issuerType "cloudflare" }} acme.cert-manager.io/http01-ingress-class: {{ $ingress }} - {{- end }} + {{- end }} cert-manager.io/cluster-issuer: letsencrypt-prod spec: ingressClassName: {{ $ingress }} diff --git a/packages/extra/versions_map b/packages/extra/versions_map index 14061a1c1..05067934b 100644 --- a/packages/extra/versions_map +++ b/packages/extra/versions_map @@ -14,7 +14,8 @@ monitoring 1.2.0 c9e0d63b monitoring 1.2.1 4471b4ba monitoring 1.3.0 6c5cf5b monitoring 1.4.0 adaf603b -monitoring 1.5.0 HEAD +monitoring 1.5.0 4b90bf5a +monitoring 1.5.1 HEAD seaweedfs 0.1.0 5ca8823 seaweedfs 0.2.0 9e33dc0 seaweedfs 0.2.1 HEAD