Doyoung Lee | 8f30e15 | 2019-05-21 16:23:07 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
| 18 | apiVersion: v1 |
| 19 | kind: ConfigMap |
| 20 | metadata: |
| 21 | name: grafana-config |
| 22 | data: |
| 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 | |
| 30 | apiVersion: v1 |
| 31 | kind: ConfigMap |
| 32 | metadata: |
| 33 | name: grafana-dashs |
| 34 | labels: |
| 35 | grafana_dashboard: "1" |
| 36 | data: |
| 37 | cdn_metrics.json: | |
| 38 | {{ .Files.Get "configs/cdn-metrics.json" | indent 4 }} |
| 39 | |
| 40 | --- |
| 41 | |
| 42 | apiVersion: v1 |
| 43 | kind: ConfigMap |
| 44 | metadata: |
| 45 | name: grafana-dash-provider |
| 46 | labels: |
| 47 | grafana_dashboard: "1" |
| 48 | data: |
| 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 | |
| 63 | apiVersion: v1 |
| 64 | kind: ConfigMap |
| 65 | metadata: |
| 66 | name: grafana-datasources-provider |
| 67 | data: |
| 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 }} |