Skip to content

Commit

Permalink
Fix alertmanager external config example (#1891)
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph Daniel <[email protected]>
  • Loading branch information
godwhoa and Joseph Daniel authored Aug 21, 2023
1 parent 7e6fe71 commit 4b5b943
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions examples/alertmanager-config-template-external.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ local kp =
common+: {
namespace: 'monitoring',
},
alertmanager+: {
config: importstr 'alertmanager-config.yaml',
},
},
alertmanager+:: {
alertmanager+: {
Expand All @@ -26,9 +29,9 @@ local kp =
},
configmap+:: {
'alert-templates': configmap(
'alertmanager-alert-template.tmpl',
'alert-templates',
$.values.common.namespace, // could be $._config.namespace to assign namespace once
{ data: importstr 'alertmanager-alert-template.tmpl' },
{ 'alertmanager-alert-template.tmpl': importstr 'alertmanager-alert-template.tmpl' },
),
},
};
Expand Down
2 changes: 1 addition & 1 deletion examples/alertmanager-config-with-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ slack_configs:
text: '{{ template "slack.text" . }}
templates:
- '/etc/alertmanager/configmaps/alertmanager-alert-template.tmpl'
- '/etc/alertmanager/configmaps/alert-templates/*.tmpl'

0 comments on commit 4b5b943

Please sign in to comment.