Chronos exporter: Added demo alert file to helm chart
Change-Id: Iea692517754d1f7bc2f95f5d47bb570a2b0cfe5c
diff --git a/chronos-exporter/templates/configmap.yaml b/chronos-exporter/templates/configmap.yaml
index 393926f..53bdb4e 100644
--- a/chronos-exporter/templates/configmap.yaml
+++ b/chronos-exporter/templates/configmap.yaml
@@ -48,3 +48,15 @@
{{ base $path }}: '{{ $root.Files.Get $path | b64enc }}'
{{ end }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "chronos-exporter.fullname" . }}-alert
+ labels:
+ app: {{ template "chronos-exporter.fullname" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+data:
+{{ (.Files.Glob "files/alerts/*.yaml").AsConfig | indent 2 }}
diff --git a/chronos-exporter/templates/deployment.yaml b/chronos-exporter/templates/deployment.yaml
index bfe6ae5..750300b 100644
--- a/chronos-exporter/templates/deployment.yaml
+++ b/chronos-exporter/templates/deployment.yaml
@@ -47,6 +47,8 @@
- "/usr/local/bin/chronos-exporter"
- "--config"
- {{ .Values.configfile }}
+ - "--alert"
+ - {{ .Values.alertfile }}
ports:
- name: metrics
containerPort: 2112
@@ -72,6 +74,9 @@
- name: exporter-site-plans
mountPath: /opt/site-plans/fremont
readOnly: true
+ - name: exporter-alert
+ mountPath: /etc/chronos-exporter/alerts
+ readOnly: true
volumes:
- name: secret
secret:
@@ -85,3 +90,6 @@
- name: exporter-site-plans
configMap:
name: {{ template "chronos-exporter.fullname" . }}-site-plans
+ - name: exporter-alert
+ configMap:
+ name: {{ template "chronos-exporter.fullname" . }}-alert