Chronos-exporter: Moved the Images and Site Plans out to Helm chart ConfigMap
Change-Id: Ie024a9c032de0d6f9326d1f6c61206ccbcfa44be
diff --git a/chronos-exporter/templates/configmap.yaml b/chronos-exporter/templates/configmap.yaml
index dd502ed..bdf31cd 100644
--- a/chronos-exporter/templates/configmap.yaml
+++ b/chronos-exporter/templates/configmap.yaml
@@ -14,3 +14,37 @@
data:
{{ (.Files.Glob "files/configs/*.yaml").AsConfig | indent 2 }}
+
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "chronos-exporter.fullname" . }}-images
+ labels:
+ app: {{ template "chronos-exporter.fullname" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+binaryData:
+ {{ $root := . }}
+ {{ range $path, $bytes := .Files.Glob "files/images/*.png" }}
+ {{ base $path }}: '{{ $root.Files.Get $path | b64enc }}'
+ {{ end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "chronos-exporter.fullname" . }}-site-plans
+ labels:
+ app: {{ template "chronos-exporter.fullname" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+binaryData:
+ {{ $root := . }}
+ {{ range $path, $bytes := .Files.Glob "files/site-plans/freemont/*.svg" }}
+ {{ base $path }}: '{{ $root.Files.Get $path | b64enc }}'
+ {{ end }}
+
diff --git a/chronos-exporter/templates/deployment.yaml b/chronos-exporter/templates/deployment.yaml
index a840040..da871e8 100644
--- a/chronos-exporter/templates/deployment.yaml
+++ b/chronos-exporter/templates/deployment.yaml
@@ -66,6 +66,12 @@
- name: exporter-config
mountPath: /etc/chronos-exporter/configs
readOnly: true
+ - name: exporter-images
+ mountPath: /opt/images
+ readOnly: true
+ - name: exporter-site-plans
+ mountPath: /opt/site-plans/freemont
+ readOnly: true
volumes:
- name: secret
secret:
@@ -73,3 +79,9 @@
- name: exporter-config
configMap:
name: {{ template "chronos-exporter.fullname" . }}-config
+ - name: exporter-images
+ configMap:
+ name: {{ template "chronos-exporter.fullname" . }}-images
+ - name: exporter-site-plans
+ configMap:
+ name: {{ template "chronos-exporter.fullname" . }}-site-plans