AETHER-2826 Adding sample demo-configurtion

Change-Id: I3247e7b2e41bdc7b1adfce886f3608f08df3470d
diff --git a/chronos-exporter/Chart.yaml b/chronos-exporter/Chart.yaml
index 070ed85..2c9d8ff 100644
--- a/chronos-exporter/Chart.yaml
+++ b/chronos-exporter/Chart.yaml
@@ -7,8 +7,8 @@
 description: Chronos Exporter

 kubeVersion: ">=1.15.0"

 type: application

-version: 0.0.1

-appVersion: v0.0.0

+version: 0.0.2

+appVersion: v0.0.2

 keywords:

   - aether

   - exporter

diff --git a/chronos-exporter/files/configs/demo-configuration.json b/chronos-exporter/files/configs/demo-configuration.json
new file mode 100644
index 0000000..389bb98
--- /dev/null
+++ b/chronos-exporter/files/configs/demo-configuration.json
@@ -0,0 +1,182 @@
+{
+  "sites": [
+    {
+      "site-id": "freemont",
+      "display-name": "Freemont, CA",
+      "image": "https://en.wikipedia.org/wiki/File:Mission_Peak_over_Lake_Elizabeth,_in_Fremont,_California_(cropped).JPG",
+      "small-cells": [
+        {
+          "small-cell-id": "freemont-sc-north",
+          "display-name": "North Cell"
+        },
+        {
+          "small-cell-id": "freemont-sc-south",
+          "display-name": "South Cell"
+        },
+        {
+          "small-cell-id": "freemont-sc-east",
+          "display-name": "East Cell"
+        },
+        {
+          "small-cell-id": "freemont-sc-west",
+          "display-name": "West Cell"
+        }
+      ],
+      "slices": [
+        {
+          "slice-id": "freemont-slice-cameras",
+          "display-name": "Cameras Slice",
+          "device-groups": [
+            "cameras"
+          ]
+        },
+        {
+          "slice-id": "freemont-slice-phones",
+          "display-name": "Phones Slice",
+          "device-groups": [
+            "phones"
+          ]
+        }
+      ],
+      "device-groups": [
+        {
+          "device-group-id": "phones",
+          "display-name": "Phones group",
+          "devices": [
+            "752365A",
+            "752908B"
+          ]
+        },
+        {
+          "device-group-id": "cameras",
+          "display-name": "Cameras group",
+          "devices": [
+            "7568111",
+            "7568112",
+            "7568113",
+            "7568114",
+            "7568115",
+            "7568116",
+            "7568117"
+          ]
+        },
+        {
+          "device-group-id": "dg2",
+          "display-name": "DG 2"
+        }
+      ],
+      "devices": [
+        {
+          "serial-number": "752365A",
+          "imei": "123-456-7891",
+          "display-name": "Phone 1",
+          "location": "Somewhere",
+          "type": "Pixel 5 Phone",
+          "sim": "123-456-789"
+        },
+        {
+          "serial-number": "752908B",
+          "imei": "123-456-7892",
+          "display-name": "Phone 2",
+          "location": "Somewhere",
+          "type": "iPhone 11",
+          "sim": "123-456-788"
+        },
+        {
+          "serial-number": "7568111",
+          "imei": "123-456-7893",
+          "display-name": "Camera 1",
+          "location": "Front entrance",
+          "type": "Camera",
+          "sim": "123-456-787"
+        },
+        {
+          "serial-number": "7568112",
+          "imei": "123-456-7894",
+          "display-name": "Camera 2",
+          "location": "South Gate",
+          "type": "Camera",
+          "sim": "123-456-786"
+        },
+        {
+          "serial-number": "7568113",
+          "imei": "123-456-7895",
+          "display-name": "Camera 3",
+          "location": "Store Room 1",
+          "type": "Camera",
+          "sim": "123-456-785"
+        },
+        {
+          "serial-number": "7568114",
+          "imei": "123-456-7896",
+          "display-name": "Camera 4",
+          "location": "Store Room 2",
+          "type": "Camera",
+          "sim": "123-456-784"
+        },
+        {
+          "serial-number": "7568115",
+          "imei": "123-456-7897",
+          "display-name": "Camera 5",
+          "location": "Corridor 1",
+          "type": "Camera",
+          "sim": "123-456-783"
+        },
+        {
+          "serial-number": "7568116",
+          "imei": "123-456-7898",
+          "display-name": "Camera 6",
+          "location": "Corridor 2",
+          "type": "Camera",
+          "sim": "123-456-782"
+        },
+        {
+          "serial-number": "7568117",
+          "imei": "123-456-7899",
+          "display-name": "Camera 7",
+          "location": "Atrium",
+          "type": "Camera",
+          "sim": "123-456-781"
+        }
+      ],
+      "sims": [
+        {
+          "iccid": "123-456-789",
+          "display-name": "Sim 9"
+        },
+        {
+          "iccid": "123-456-788",
+          "display-name": "Sim 8"
+        },
+        {
+          "iccid": "123-456-787",
+          "display-name": "Sim 7"
+        },
+        {
+          "iccid": "123-456-786",
+          "display-name": "Sim 6"
+        },
+        {
+          "iccid": "123-456-785",
+          "display-name": "Sim 5"
+        },
+        {
+          "iccid": "123-456-784",
+          "display-name": "Sim 4"
+        },
+        {
+          "iccid": "123-456-783",
+          "display-name": "Sim 3"
+        },
+        {
+          "iccid": "123-456-782",
+          "display-name": "Sim 2"
+        },
+        {
+          "iccid": "123-456-781",
+          "display-name": "Sim 1"
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/chronos-exporter/templates/configmap.yaml b/chronos-exporter/templates/configmap.yaml
new file mode 100644
index 0000000..5090a7e
--- /dev/null
+++ b/chronos-exporter/templates/configmap.yaml
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "chronos-exporter.fullname" . }}-config
+  labels:
+    app: {{ template "chronos-exporter.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+data:
+  {{ $root := . }}
+    {{ range $path, $bytes := .Files.Glob "files/configs/*.json" }}
+    {{ base $path }}: '{{ $root.Files.Get $path }}'
+    {{ end }}
diff --git a/chronos-exporter/templates/deployment.yaml b/chronos-exporter/templates/deployment.yaml
index 0ad83eb..a840040 100644
--- a/chronos-exporter/templates/deployment.yaml
+++ b/chronos-exporter/templates/deployment.yaml
@@ -45,6 +45,8 @@
                   fieldPath: spec.nodeName

           args:

             - "/usr/local/bin/chronos-exporter"

+            - "--config"

+            - {{ .Values.configfile }}

           ports:

             - name: metrics

               containerPort: 2112

@@ -60,7 +62,14 @@
               port: 2112

             initialDelaySeconds: 15

             periodSeconds: 20

+          volumeMounts:

+            - name: exporter-config

+              mountPath: /etc/chronos-exporter/configs

+              readOnly: true

       volumes:

         - name: secret

           secret:

-            secretName: {{ template "chronos-exporter.fullname" . }}-secret
\ No newline at end of file
+            secretName: {{ template "chronos-exporter.fullname" . }}-secret

+        - name: exporter-config

+          configMap:

+            name: {{ template "chronos-exporter.fullname" . }}-config

diff --git a/chronos-exporter/values.yaml b/chronos-exporter/values.yaml
index b73cc4e..df98f3a 100644
--- a/chronos-exporter/values.yaml
+++ b/chronos-exporter/values.yaml
@@ -10,9 +10,11 @@
 

 image:

   repository: onosproject/chronos-exporter

-  tag: latest

+  tag: v0.0.2

   pullPolicy: IfNotPresent

   pullSecrets: []

 

 service:

   type: ClusterIP

+

+configfile: /etc/chronos-exporter/configs/demo-configuration.json
\ No newline at end of file
diff --git a/chronos-umbrella/Chart.yaml b/chronos-umbrella/Chart.yaml
index 7cf0cfc..557791f 100644
--- a/chronos-umbrella/Chart.yaml
+++ b/chronos-umbrella/Chart.yaml
@@ -7,7 +7,7 @@
 description: Chronos Umbrella chart to deploy all Aether ROC

 kubeVersion: ">=1.18.0"

 type: application

-version: 0.0.1

+version: 0.0.2

 appVersion: v0.0.0

 keywords:

   - aether

@@ -29,4 +29,4 @@
   - name: chronos-exporter

     condition: import.chronos-exporter.enabled

     repository: "file://../chronos-exporter"

-    version: 0.0.1

+    version: 0.0.2