Skip to content

Commit 174dda9

Browse files
committed
More sensible naming for HA configmaps
1 parent 6df4ae3 commit 174dda9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

prometheus-ksonnet/lib/prometheus-ha-mixin.libsonnet

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,40 +50,40 @@ local configMap = k.core.v1.configMap;
5050
},
5151

5252
prometheus_config_maps: [
53-
configMap.new('%s-config-0' % self.name) +
53+
configMap.new('%s-0-config' % self.name) +
5454
configMap.withData({
5555
'prometheus.yml': k.util.manifestYaml(root.prometheus_zero.config),
5656
}),
57-
configMap.new('%s-alerts-0' % self.name) +
57+
configMap.new('%s-0-alerts' % self.name) +
5858
configMap.withData({
5959
'alerts.rules': k.util.manifestYaml(root.prometheus_zero.alerts),
6060
}),
61-
configMap.new('%s-recording-0' % self.name) +
61+
configMap.new('%s-0-recording' % self.name) +
6262
configMap.withData({
6363
'recording.rules': k.util.manifestYaml(root.prometheus_zero.rules),
6464
}),
6565

66-
configMap.new('%s-config-1' % self.name) +
66+
configMap.new('%s-1-config' % self.name) +
6767
configMap.withData({
6868
'prometheus.yml': k.util.manifestYaml(root.prometheus_one.config),
6969
}),
70-
configMap.new('%s-alerts-1' % self.name) +
70+
configMap.new('%s-1-alerts' % self.name) +
7171
configMap.withData({
7272
'alerts.rules': k.util.manifestYaml(root.prometheus_one.alerts),
7373
}),
74-
configMap.new('%s-recording-1' % self.name) +
74+
configMap.new('%s-1-recording' % self.name) +
7575
configMap.withData({
7676
'recording.rules': k.util.manifestYaml(root.prometheus_one.rules),
7777
}),
7878
],
7979

8080
prometheus_config_mount::
81-
k.util.configVolumeMount('%s-config-0' % self.name, '/etc/prometheus-0')
82-
+ k.util.configVolumeMount('%s-alerts-0' % self.name, '/etc/prometheus-0/alerts')
83-
+ k.util.configVolumeMount('%s-recording-0' % self.name, '/etc/prometheus-0/recording')
84-
+ k.util.configVolumeMount('%s-config-1' % self.name, '/etc/prometheus-1')
85-
+ k.util.configVolumeMount('%s-alerts-1' % self.name, '/etc/prometheus-1/alerts')
86-
+ k.util.configVolumeMount('%s-recording-1' % self.name, '/etc/prometheus-1/recording')
81+
k.util.configVolumeMount('%s-0-config' % self.name, '/etc/prometheus-0')
82+
+ k.util.configVolumeMount('%s-0-alerts' % self.name, '/etc/prometheus-0/alerts')
83+
+ k.util.configVolumeMount('%s-0-recording' % self.name, '/etc/prometheus-0/recording')
84+
+ k.util.configVolumeMount('%s-1-config' % self.name, '/etc/prometheus-1')
85+
+ k.util.configVolumeMount('%s-1-alerts' % self.name, '/etc/prometheus-1/alerts')
86+
+ k.util.configVolumeMount('%s-1-recording' % self.name, '/etc/prometheus-1/recording')
8787
,
8888

8989
prometheus_container+:: container.withEnv([

0 commit comments

Comments
 (0)