Skip to content

Commit

Permalink
feat(grafana): refactoring contact points
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Nov 13, 2024
1 parent e6c1f23 commit 11cc575
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,22 @@ spec:
instanceSelector:
matchLabels:
{{- toYaml $.Values.grafanaOperator.matchLabels | nindent 6 }}
title: {{ $contactPoint.title | quote }}
slack:
name: slack-{{ $contactPoint.name }}
type: "slack"
settings:
url: {{ $contactPoint.url | quote }}
# valuesFrom:
# - targetPath: channel
# valueFrom:
# secretKeyRef:
# name: grafana-contactpoint-slack-{{ $contactPoint.name }}
# key: channel
# - targetPath: text
# valueFrom:
# secretKeyRef:
# name: grafana-contactpoint-slack-{{ $contactPoint.name }}
# key: text
channel: {{ $contactPoint.channel | quote }}
text: |
{{ len .Alerts.Firing }} alerts are firing!
Expand All @@ -69,5 +82,4 @@ spec:
• *{{ "{{" }} .Name {{ "}}" }}:* {{ "{{" }} .Value {{ "}}" }}
{{ "{{" }} end {{ "}}" }}
{{ "{{" }} end {{ "}}" }}
|
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ grafanaOperator:
emails:
- name: default
subject: "[grafana/core] Alerting"
slack: []
# - name: default
# url: https://slack.com/xx/xx
# channel: "#alerting-test"
notificationPolicies:
enabled: false
name: core
Expand Down

0 comments on commit 11cc575

Please sign in to comment.