diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index 1ac17f6770..424f00b8e1 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -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: diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index c7e159e522..b954afdbd1 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -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 | `[]` | diff --git a/stable/prometheus-operator/ci/test-values.yaml b/stable/prometheus-operator/ci/test-values.yaml index 67ca2bc38d..84d3090c86 100644 --- a/stable/prometheus-operator/ci/test-values.yaml +++ b/stable/prometheus-operator/ci/test-values.yaml @@ -360,6 +360,7 @@ grafana: label: grafana_dashboard datasources: enabled: true + defaultDatasourceEnabled: true label: grafana_datasource extraConfigmapMounts: [] diff --git a/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml b/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml index 8c1c351d47..ca19d0e3c3 100644 --- a/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml +++ b/stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml @@ -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 }} diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index 114b01682a..2c97998e71 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -360,6 +360,7 @@ grafana: label: grafana_dashboard datasources: enabled: true + defaultDatasourceEnabled: true label: grafana_datasource extraConfigmapMounts: []