From 4a62faced2be7dd19a2ebfcef9a1939d23afd0a6 Mon Sep 17 00:00:00 2001 From: CarlosEDP Date: Wed, 8 May 2019 22:23:16 -0300 Subject: [PATCH] Better jsonnet format --- main.jsonnet | 8 ++++---- vars.jsonnet | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/main.jsonnet b/main.jsonnet index 735e674..c512d18 100644 --- a/main.jsonnet +++ b/main.jsonnet @@ -11,8 +11,8 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + (import 'smtp_server.jsonnet') // Additional Modules + (if vars.installModules['arm-exporter'] then (import 'arm_exporter.jsonnet') else {}) - + (if vars.installModules.metallb then (import 'metallb.jsonnet') else {}) - + (if vars.installModules.traefik then (import 'traefik.jsonnet') else {}) + + (if vars.installModules['metallb-exporter'] then (import 'metallb.jsonnet') else {}) + + (if vars.installModules['traefik-exporter'] then (import 'traefik.jsonnet') else {}) + (if vars.installModules['ups-exporter'] then (import 'ups_exporter.jsonnet') else {}) + (if vars.installModules['elastic-exporter'] then (import 'elasticsearch_exporter.jsonnet') else {}) // Load image versions last to override default from modules @@ -31,9 +31,9 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') // Additional Modules (if vars.installModules['arm-exporter'] then { ['arm-exporter-' + name]: kp.armExporter[name] for name in std.objectFields(kp.armExporter) } else {}) + -(if vars.installModules.metallb then +(if vars.installModules['metallb-exporter'] then { ['metallb-' + name]: kp.metallb[name] for name in std.objectFields(kp.metallb) } else {}) + -(if vars.installModules.traefik then +(if vars.installModules['traefik-exporter'] then { ['traefik-' + name]: kp.traefik[name] for name in std.objectFields(kp.traefik) } else {}) + (if vars.installModules['ups-exporter'] then { ['ups-exporter-' + name]: kp.upsExporter[name] for name in std.objectFields(kp.upsExporter) } else {}) + diff --git a/vars.jsonnet b/vars.jsonnet index 3829408..a289975 100644 --- a/vars.jsonnet +++ b/vars.jsonnet @@ -2,8 +2,8 @@ // Enable or disable additional modules installModules: { 'arm-exporter': false, - metallb: false, - traefik: false, + 'metallb-exporter': false, + 'traefik-exporter': false, 'ups-exporter': false, 'elastic-exporter': false, }, @@ -15,10 +15,10 @@ }, // Domain suffix for the ingresses - suffixDomain: "192.168.99.100.nip.io", + suffixDomain: '192.168.99.100.nip.io', // Grafana "from" email grafana: { from_address: 'myemail@gmail.com', }, -} \ No newline at end of file +}