Add grafana dashboards and configmap creation for auto provisioning (#2519)
* Add grafana dashboards and configmap creation * Fix Data source, job and template rules * Add units to all panels * fix units and fix linting issues * Enable verbose linting for dashboards Co-authored-by: shaunak_deshmukh <shaunak@infracloud.io>
This commit is contained in:
co-authored by
shaunak_deshmukh
parent
dea7b2be94
commit
05130949ad
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.grafana.dashboards.enable }}
|
||||
{{- $files := .Files }}
|
||||
{{- range $path, $bytes := .Files.Glob "dashboards/*.json" }}
|
||||
{{- $filename := trimSuffix (ext $path) (base $path) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" $.Chart.Name $filename | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ $.grafana.Namespace }}
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
created_by: "{{ .Chart.Name }}"
|
||||
data:
|
||||
{{ base $path }}: '{{ $files.Get $path }}'
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user