From 9591a925c7090eb6b1e787e520732a56b022e001 Mon Sep 17 00:00:00 2001 From: Theo Brigitte Date: Fri, 13 Dec 2024 12:52:01 +0100 Subject: [PATCH] rename alertmanager to alerting in values.yaml --- .../alertmanager.yaml.helm-template | 84 +++++++++---------- .../url-template.tmpl.helm-template | 6 +- helm/observability-operator/values.yaml | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/helm/observability-operator/files/alertmanager/alertmanager.yaml.helm-template b/helm/observability-operator/files/alertmanager/alertmanager.yaml.helm-template index f8a73102..1ced9a3e 100644 --- a/helm/observability-operator/files/alertmanager/alertmanager.yaml.helm-template +++ b/helm/observability-operator/files/alertmanager/alertmanager.yaml.helm-template @@ -1,13 +1,13 @@ global: resolve_timeout: 5m -{{- if .Values.alertmanager.proxyURL }} +{{- if .Values.alerting.proxyURL }} http_config: - proxy_url: {{ .Values.alertmanager.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} -{{- if .Values.alertmanager.slackAPIToken }} +{{- if .Values.alerting.slackAPIToken }} slack_api_url: "https://slack.com/api/chat.postMessage" {{- else }} - slack_api_url: {{ .Values.alertmanager.slackAPIURL }} + slack_api_url: {{ .Values.alerting.slackAPIURL }} {{- end }} route: @@ -174,8 +174,8 @@ receivers: credentials: {{ .Values.monitoring.opsgenieApiKey }} follow_redirects: true enable_http2: true - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} url: https://api.opsgenie.com/v2/heartbeats/{{ .Values.managementCluster.name }}/ping @@ -186,13 +186,13 @@ receivers: - name: falco_noise_slack slack_configs: - channel: '#noise-falco' - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -222,13 +222,13 @@ receivers: {{- else }} - channel: '#alert-atlas-test' {{- end }} - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -241,13 +241,13 @@ receivers: {{- else }} - channel: '#alert-phoenix-test' {{- end }} - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -260,13 +260,13 @@ receivers: {{- else }} - channel: '#alert-bigmac-test' {{- end }} - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -279,13 +279,13 @@ receivers: {{- else }} - channel: '#alert-rocket-test' {{- end }} - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -294,13 +294,13 @@ receivers: - name: team_shield_slack slack_configs: - channel: '#alert-shield' - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -313,13 +313,13 @@ receivers: {{- else }} - channel: '#alert-turtles-test' {{- end }} - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -328,13 +328,13 @@ receivers: - name: team_tenet_slack slack_configs: - channel: '#alert-tenet' - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true @@ -343,13 +343,13 @@ receivers: - name: team_honeybadger_slack slack_configs: - channel: '#alert-honeybadger' - {{- if .Values.alertmanager.slackAPIToken }} + {{- if .Values.alerting.slackAPIToken }} http_config: authorization: type: Bearer - credentials: {{ .Values.alertmanager.slackAPIToken }} - {{- if .Values.alertmanager.proxyURL }} - proxy_url: {{ .Values.alertmanager.proxyURL }} + credentials: {{ .Values.alerting.slackAPIToken }} + {{- if .Values.alerting.proxyURL }} + proxy_url: {{ .Values.alerting.proxyURL }} {{- end }} {{- end }} send_resolved: true diff --git a/helm/observability-operator/files/alertmanager/url-template.tmpl.helm-template b/helm/observability-operator/files/alertmanager/url-template.tmpl.helm-template index 11630d3d..b93f8937 100644 --- a/helm/observability-operator/files/alertmanager/url-template.tmpl.helm-template +++ b/helm/observability-operator/files/alertmanager/url-template.tmpl.helm-template @@ -1,17 +1,17 @@ {{` {{ define "__alerturl" }} -`}}{{ .Values.alertmanager.grafanaAddress }}{{`/alerting/Mimir/{{ .CommonLabels.alertname }}/find +`}}{{ .Values.alerting.grafanaAddress }}{{`/alerting/Mimir/{{ .CommonLabels.alertname }}/find {{ end }} {{ define "__dashboardurl" -}} {{ if match "^https://.+" (index .Alerts 0).Annotations.dashboard }}{{ (index .Alerts 0).Annotations.dashboard }} {{ else }} -`}}{{ .Values.alertmanager.grafanaAddress }}{{`/d/{{ (index .Alerts 0).Annotations.dashboard }} +`}}{{ .Values.alerting.grafanaAddress }}{{`/d/{{ (index .Alerts 0).Annotations.dashboard }} {{ end }} {{- end }} {{ define "__queryurl" }} -`}}{{ .Values.alertmanager.grafanaAddress }}{{`/alerting/Mimir/{{ .CommonLabels.alertname }}/find +`}}{{ .Values.alerting.grafanaAddress }}{{`/alerting/Mimir/{{ .CommonLabels.alertname }}/find {{ end }} {{ define "__runbookurl" -}}https://intranet.giantswarm.io/docs/support-and-ops/ops-recipes/{{ (index .Alerts 0).Annotations.opsrecipe }}{{- end }} diff --git a/helm/observability-operator/values.yaml b/helm/observability-operator/values.yaml index d3a8fa30..23e398b9 100644 --- a/helm/observability-operator/values.yaml +++ b/helm/observability-operator/values.yaml @@ -15,7 +15,7 @@ managementCluster: pipeline: pipeline region: region -alertmanager: +alerting: alertmanagerURL: "" grafanaAddress: "" proxyURL: ""