Fix alertmanager external config example (#1891)

Co-authored-by: Joseph Daniel <joseph@apxor.com>
This commit is contained in:
Joseph Daniel
2023-08-21 14:47:16 +05:30
committed by GitHub
parent 7e6fe71d93
commit 4b5b94347d
2 changed files with 6 additions and 3 deletions

View File

@@ -15,6 +15,9 @@ local kp =
common+: { common+: {
namespace: 'monitoring', namespace: 'monitoring',
}, },
alertmanager+: {
config: importstr 'alertmanager-config.yaml',
},
}, },
alertmanager+:: { alertmanager+:: {
alertmanager+: { alertmanager+: {
@@ -26,9 +29,9 @@ local kp =
}, },
configmap+:: { configmap+:: {
'alert-templates': configmap( 'alert-templates': configmap(
'alertmanager-alert-template.tmpl', 'alert-templates',
$.values.common.namespace, // could be $._config.namespace to assign namespace once $.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' },
), ),
}, },
}; };

View File

@@ -24,4 +24,4 @@ slack_configs:
text: '{{ template "slack.text" . }} text: '{{ template "slack.text" . }}
templates: templates:
- '/etc/alertmanager/configmaps/alertmanager-alert-template.tmpl' - '/etc/alertmanager/configmaps/alert-templates/*.tmpl'