diff --git a/Makefile b/Makefile index 45ecf77..821c26f 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ JB_BINARY := $(GOPATH)/bin/jb all: manifests -manifests: jsonnet +manifests: jsonnet fmt rm -rf manifests ./scripts/build.sh main.jsonnet $(JSONNET_BIN) diff --git a/arm_exporter.jsonnet b/arm_exporter.jsonnet index 9ed4ea3..42bd4df 100644 --- a/arm_exporter.jsonnet +++ b/arm_exporter.jsonnet @@ -3,6 +3,14 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; { _config+:: { namespace: 'monitoring', + + versions+:: { + armExporter: 'latest', + }, + + imageRepos+:: { + armExporter: 'carlosedp/arm_exporter', + }, }, armExporter+:: { diff --git a/elasticsearch_exporter.jsonnet b/elasticsearch_exporter.jsonnet index 26451be..5c61611 100644 --- a/elasticsearch_exporter.jsonnet +++ b/elasticsearch_exporter.jsonnet @@ -5,6 +5,14 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; namespace: 'monitoring', replicas: 1, + versions+:: { + elasticExporter: '1.0.2', + }, + + imageRepos+:: { + elasticExporter: 'justwatch/elasticsearch_exporter', + }, + // Add custom dashboards grafanaDashboards+:: { 'elasticsearch-dashboard.json': (import 'grafana-dashboards/elasticsearch-dashboard.json'), diff --git a/main.jsonnet b/main.jsonnet index d68c18b..de53728 100644 --- a/main.jsonnet +++ b/main.jsonnet @@ -13,7 +13,6 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + (import 'kube-prometheus/kube-prometheus-kops-coredns.libsonnet') + (import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') - + (import 'image_sources_versions.jsonnet') + (import 'base_operator_stack.jsonnet') + (import 'smtp_server.jsonnet') // Additional Modules @@ -21,7 +20,9 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + (if installModules.metallb then (import 'metallb.jsonnet') else {}) + (if installModules.traefik then (import 'traefik.jsonnet') else {}) + (if installModules['ups-exporter'] then (import 'ups_exporter.jsonnet') else {}) - + (if installModules['elastic-exporter'] then (import 'elasticsearch_exporter.jsonnet') else {}); + + (if installModules['elastic-exporter'] then (import 'elasticsearch_exporter.jsonnet') else {}) + // Load image versions last to override default from modules + + (import 'image_sources_versions.jsonnet'); { ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } { ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } + diff --git a/smtp_server.jsonnet b/smtp_server.jsonnet index 1d74218..610a9ed 100644 --- a/smtp_server.jsonnet +++ b/smtp_server.jsonnet @@ -3,6 +3,14 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; { _config+:: { namespace: 'monitoring', + + versions+:: { + smtpServer: 'v1.0.1', + }, + + imageRepos+:: { + smtpServer: 'carlosedp/docker-smtp', + }, }, smtpServer+:: {