Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
6c7c756b
Commit
6c7c756b
authored
6 years ago
by
Robert Nemeti
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet
+26
-17
26 additions, 17 deletions
jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet
with
26 additions
and
17 deletions
jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet
+
26
−
17
View file @
6c7c756b
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment