mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/prometheus-operator] Create datasource for each Prometheus (#14846)
- Adds ability to create datasource for each Pod of Prometheus - Uses headless service prometheus-operated which is created by Prometheus Operator - ref: https://github.com/coreos/prometheus-operator/blob/0fee93e12dc7c2ea1218f19ae25ec6b893460590/pkg/prometheus/statefulset.go#L255-L286 - Update README.md - Bump version in Chart.yaml Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
9b4638fc70
commit
cfbcbb1ddd
@@ -11,7 +11,7 @@ name: prometheus-operator
|
||||
sources:
|
||||
- https://github.com/coreos/prometheus-operator
|
||||
- https://coreos.com/operators/prometheus
|
||||
version: 5.18.0
|
||||
version: 5.19.0
|
||||
appVersion: 0.31.1
|
||||
home: https://github.com/coreos/prometheus-operator
|
||||
keywords:
|
||||
|
||||
@@ -333,7 +333,8 @@ For a full list of configurable values please refer to the [Grafana chart](https
|
||||
| `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.defaultDatasourceEnabled` | Enable Grafana `Prometheus` default datasource | `true` |
|
||||
| `grafana.sidecar.datasources.createPrometheusReplicasDatasources` | Create datasource for each Pod of Prometheus StatefulSet i.e. `Prometheus-0`, `Prometheus-1` | `false` |
|
||||
| `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 | `[]` |
|
||||
|
||||
@@ -17,6 +17,15 @@ data:
|
||||
url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:9090/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
|
||||
access: proxy
|
||||
isDefault: true
|
||||
{{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }}
|
||||
{{- range until (int .Values.prometheus.prometheusSpec.replicas) }}
|
||||
- name: Prometheus-{{ . }}
|
||||
type: prometheus
|
||||
url: http://prometheus-{{ template "prometheus-operator.fullname" $ }}-prometheus-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }}
|
||||
access: proxy
|
||||
isDefault: false
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.grafana.additionalDataSources }}
|
||||
{{ toYaml .Values.grafana.additionalDataSources | indent 4}}
|
||||
|
||||
@@ -411,6 +411,11 @@ grafana:
|
||||
datasources:
|
||||
enabled: true
|
||||
defaultDatasourceEnabled: true
|
||||
## Create datasource for each Pod of Prometheus StatefulSet;
|
||||
## this uses headless service `prometheus-operated` which is
|
||||
## created by Prometheus Operator
|
||||
## ref: https://git.io/fjaBS
|
||||
createPrometheusReplicasDatasources: false
|
||||
label: grafana_datasource
|
||||
|
||||
extraConfigmapMounts: []
|
||||
|
||||
Reference in New Issue
Block a user