COMAC-18: Grafana-via-Prometheus for M-CORD CDN monitoring

Change-Id: I230a8bbfd866ca4e784dbd24f28943596cc70239
diff --git a/mcord/mcord-cdn-monitoring/templates/grafana-cfg.yaml b/mcord/mcord-cdn-monitoring/templates/grafana-cfg.yaml
new file mode 100644
index 0000000..dc76aef
--- /dev/null
+++ b/mcord/mcord-cdn-monitoring/templates/grafana-cfg.yaml
@@ -0,0 +1,78 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.grafana.enabled }}
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: grafana-config
+data:
+  grafana.ini: |
+{{ .Files.Get "configs/grafana.ini" | indent 4 }}
+  ldap.toml: |
+{{ .Files.Get "configs/ldap.toml" | indent 4 }}
+
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: grafana-dashs
+  labels:
+    grafana_dashboard: "1"
+data:
+  cdn_metrics.json: |
+{{ .Files.Get "configs/cdn-metrics.json" | indent 4 }}
+
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: grafana-dash-provider
+  labels:
+    grafana_dashboard: "1"
+data:
+  dashboard.yaml: |
+    apiVersion: 1
+
+    providers:
+      - name: 'default'
+        orgId: 1
+        folder: ''
+        type: file
+        disableDeletion: false
+        updateIntervalSeconds: 3
+        options:
+          path: /etc/grafana/dashboards
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: grafana-datasources-provider
+data:
+  prometheus-datasource.yaml: |
+    datasources:
+      -  access: 'proxy'
+         editable: true
+         is_default: true
+         name: 'prom'
+         org_id: 1
+         type: 'prometheus'
+         url: http://{{ .Values.prometheus_host }}:{{ .Values.prometheus.nodePort }}
+
+{{- end }}
\ No newline at end of file