Skip to content
Snippets Groups Projects
Commit 6c7c756b authored by Robert Nemeti's avatar Robert Nemeti
Browse files

objectify alertmanager config

this way it will be possible to merge configs
parent 873ef744
No related branches found
No related tags found
No related merge requests found
......@@ -14,22 +14,31 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
alertmanager+:: {
name: $._config.alertmanager.name,
config: |||
global:
resolve_timeout: 5m
route:
group_by: ['job']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- match:
alertname: DeadMansSwitch
receiver: 'null'
receivers:
- name: 'null'
|||,
config: {
global: {
resolve_timeout: '5m',
},
route: {
group_by: ['job'],
group_wait: '30s',
group_interval: '5m',
repeat_interval: '12h',
receiver: 'null',
routes: [
{
receiver: 'null',
match: {
alertname: 'DeadMansSwitch',
},
},
],
},
receivers: [
{
name: 'null',
},
],
},
replicas: 3,
},
},
......@@ -38,7 +47,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
secret:
local secret = k.core.v1.secret;
secret.new('alertmanager-' + $._config.alertmanager.name, { 'alertmanager.yaml': std.base64($._config.alertmanager.config) }) +
secret.new('alertmanager-' + $._config.alertmanager.name, { 'alertmanager.yaml': std.base64(std.manifestYamlDoc($._config.alertmanager.config)) }) +
secret.mixin.metadata.withNamespace($._config.namespace),
serviceAccount:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment