blob: dc76aefb8ba2d2896a72929e8a843e957a96ca9d [file] [log] [blame]
Doyoung Lee8f30e152019-05-21 16:23:07 -07001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16{{- if .Values.grafana.enabled }}
17
18apiVersion: v1
19kind: ConfigMap
20metadata:
21 name: grafana-config
22data:
23 grafana.ini: |
24{{ .Files.Get "configs/grafana.ini" | indent 4 }}
25 ldap.toml: |
26{{ .Files.Get "configs/ldap.toml" | indent 4 }}
27
28---
29
30apiVersion: v1
31kind: ConfigMap
32metadata:
33 name: grafana-dashs
34 labels:
35 grafana_dashboard: "1"
36data:
37 cdn_metrics.json: |
38{{ .Files.Get "configs/cdn-metrics.json" | indent 4 }}
39
40---
41
42apiVersion: v1
43kind: ConfigMap
44metadata:
45 name: grafana-dash-provider
46 labels:
47 grafana_dashboard: "1"
48data:
49 dashboard.yaml: |
50 apiVersion: 1
51
52 providers:
53 - name: 'default'
54 orgId: 1
55 folder: ''
56 type: file
57 disableDeletion: false
58 updateIntervalSeconds: 3
59 options:
60 path: /etc/grafana/dashboards
61---
62
63apiVersion: v1
64kind: ConfigMap
65metadata:
66 name: grafana-datasources-provider
67data:
68 prometheus-datasource.yaml: |
69 datasources:
70 - access: 'proxy'
71 editable: true
72 is_default: true
73 name: 'prom'
74 org_id: 1
75 type: 'prometheus'
76 url: http://{{ .Values.prometheus_host }}:{{ .Values.prometheus.nodePort }}
77
78{{- end }}