Skip to content

Commit 4b5b943

Browse files
godwhoaJoseph Daniel
and
Joseph Daniel
authored
Fix alertmanager external config example (prometheus-operator#1891)
Co-authored-by: Joseph Daniel <joseph@apxor.com>
1 parent 7e6fe71 commit 4b5b943

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples/alertmanager-config-template-external.jsonnet

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ local kp =
1515
common+: {
1616
namespace: 'monitoring',
1717
},
18+
alertmanager+: {
19+
config: importstr 'alertmanager-config.yaml',
20+
},
1821
},
1922
alertmanager+:: {
2023
alertmanager+: {
@@ -26,9 +29,9 @@ local kp =
2629
},
2730
configmap+:: {
2831
'alert-templates': configmap(
29-
'alertmanager-alert-template.tmpl',
32+
'alert-templates',
3033
$.values.common.namespace, // could be $._config.namespace to assign namespace once
31-
{ data: importstr 'alertmanager-alert-template.tmpl' },
34+
{ 'alertmanager-alert-template.tmpl': importstr 'alertmanager-alert-template.tmpl' },
3235
),
3336
},
3437
};

examples/alertmanager-config-with-template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ slack_configs:
2424
text: '{{ template "slack.text" . }}
2525
2626
templates:
27-
- '/etc/alertmanager/configmaps/alertmanager-alert-template.tmpl'
27+
- '/etc/alertmanager/configmaps/alert-templates/*.tmpl'

0 commit comments

Comments
 (0)