Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
extends chart to allow configuration of provisioners
Browse files Browse the repository at this point in the history
  • Loading branch information
BugRoger committed Apr 9, 2018
1 parent b0fdac3 commit b3559aa
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: grafana
version: 0.8.5
version: 0.8.6
appVersion: 5.0.4
description: The leading tool for querying and visualizing time series and metrics.
home: https://grafana.net
Expand Down
18 changes: 18 additions & 0 deletions stable/grafana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ spec:
resources:
{{ toYaml .Values.server.resources | indent 12 }}
volumeMounts:
{{- if .Values.provisioningDatasourcesFiles }}
- name: provisioning-volume
mountPath: {{ default "/var/lib/grafana/provisioning" .Values.server.provisioningLocalPath }}/datasources
{{- end }}
{{- if .Values.provisioningDashboardsFiles }}
- name: provisioning-dashboards-volume
mountPath: {{ default "/var/lib/grafana/provisioning" .Values.server.provisioningLocalPath }}/dashboards
{{- end }}
- name: config-volume
mountPath: {{ default "/etc/grafana" .Values.server.configLocalPath | quote }}
- name: dashboard-volume
Expand All @@ -114,6 +122,16 @@ spec:
- name: dashboard-volume-configmap
configMap:
name: {{ template "grafana.server.fullname" . }}-dashs
{{- if .Values.provisioningDatasourcesFiles }}
- name: provisioning-volume
configMap:
name: {{ template "grafana.server.fullname" . }}-pdata
{{- end }}
{{- if .Values.provisioningDashboardsFiles }}
- name: provisioning-dashboards-volume
configMap:
name: {{ template "grafana.server.fullname" . }}-pdash
{{- end }}
- name: storage-volume
{{- if .Values.server.persistentVolume.enabled }}
persistentVolumeClaim:
Expand Down
14 changes: 14 additions & 0 deletions stable/grafana/templates/provisioning-dashboards-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.provisioningDashboardsFiles -}}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ template "grafana.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Values.server.name }}"
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
name: {{ template "grafana.server.fullname" . }}-pdash
data:
{{ toYaml .Values.provisioningDashboardsFiles | indent 2 }}
{{- end -}}
14 changes: 14 additions & 0 deletions stable/grafana/templates/provisioning-datasources-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.provisioningDatasourcesFiles -}}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ template "grafana.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Values.server.name }}"
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
name: {{ template "grafana.server.fullname" . }}-pdata
data:
{{ toYaml .Values.provisioningDatasourcesFiles | indent 2 }}
{{- end -}}
17 changes: 17 additions & 0 deletions stable/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ server:
##
# storageLocalPath: /var/lib/grafana/data

## Grafana local provisioning path
## Default: '/var/lib/grafana/provisioning'
##
# provisioningLocalPath: /var/lib/grafana/provisioning

## Grafana Pod termination grace period
## Default: 300s (5m)
##
Expand Down Expand Up @@ -274,6 +279,7 @@ serverConfigFile:
data = /var/lib/grafana/data
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
provisioning = /var/lib/grafana/provisioning
[server]
;protocol = http
Expand Down Expand Up @@ -473,3 +479,14 @@ dashboardImports:
## Default: post-install,post-upgrade
##
hook: post-install,post-upgrade
# restartPolicy: OnFailure


## Grafana dashboard/datasource provisioner configuration
##
## If you'd like to use the provisioners to pull in dashboards from an external
## source, add the configuration files below.
##
## See: http://docs.grafana.org/administration/provisioning/
provisioningDashboardsFiles: {}
provisioningDatasourcesFiles: {}

0 comments on commit b3559aa

Please sign in to comment.