Skip to content

Commit

Permalink
rename alertmanager to alerting in values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Dec 13, 2024
1 parent 492a1d7 commit 9591a92
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/observability-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ managementCluster:
pipeline: pipeline
region: region

alertmanager:
alerting:
alertmanagerURL: ""
grafanaAddress: ""
proxyURL: ""
Expand Down

0 comments on commit 9591a92

Please sign in to comment.