Make grafana default datasource optional (#12895)

* make default ds optional

Signed-off-by: Rafael Jesus <rafaelljesus86@gmail.com>

* add example on ci folder

Signed-off-by: Rafael Jesus <rafaelljesus86@gmail.com>
This commit is contained in:
Rafael Jesus
2019-04-08 02:40:29 -07:00
committed by Kubernetes Prow Robot
parent 5847aec24a
commit eb7c2d5cef
5 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ name: prometheus-operator
sources:
- https://github.com/coreos/prometheus-operator
- https://coreos.com/operators/prometheus
version: 5.0.7
version: 5.0.8
appVersion: 0.29.0
home: https://github.com/coreos/prometheus-operator
keywords:
+1
View File
@@ -302,6 +302,7 @@ The following tables list the configurable parameters of the prometheus-operator
| `grafana.sidecar.dashboards.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.dashboards.label }}=1` | `true` |
| `grafana.sidecar.dashboards.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as dashboards | `grafana_dashboard` |
| `grafana.sidecar.datasources.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.datasources.label }}=1` | `true` |
| `grafana.sidecar.datasources.defaultDatasourceEnabled` | Enable Grafana `Prometheus` default datasource` | `true` |
| `grafana.sidecar.datasources.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as datasources configurations | `grafana_datasource` |
| `grafana.rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | `true` |
| `grafana.extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` |
@@ -360,6 +360,7 @@ grafana:
label: grafana_dashboard
datasources:
enabled: true
defaultDatasourceEnabled: true
label: grafana_datasource
extraConfigmapMounts: []
@@ -11,11 +11,13 @@ data:
datasource.yaml: |-
apiVersion: 1
datasources:
{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }}
- name: Prometheus
type: prometheus
url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:9090/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
access: proxy
isDefault: true
{{- end }}
{{- if .Values.grafana.additionalDataSources }}
{{ toYaml .Values.grafana.additionalDataSources | indent 4}}
{{- end }}
+1
View File
@@ -360,6 +360,7 @@ grafana:
label: grafana_dashboard
datasources:
enabled: true
defaultDatasourceEnabled: true
label: grafana_datasource
extraConfigmapMounts: []