Skip to content

Commit

Permalink
[kube-prometheus-stack] introduce optional param grafana.sidecar.data…
Browse files Browse the repository at this point in the history
…sources.defaultDatasourceScrapeInterval. (#659)

Allow to decorelate prometheus.prometheusSpec.scrapeInterval from the one in grafana default datasource.

Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
  • Loading branch information
desaintmartin committed Feb 10, 2021
1 parent 9e4035b commit 49e8db1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Expand Up @@ -18,7 +18,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 13.6.0
version: 13.7.0
appVersion: 0.45.0
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Expand Up @@ -16,7 +16,7 @@ data:
datasource.yaml: |-
apiVersion: 1
datasources:
{{- $scrapeInterval := .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }}
{{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }}
{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }}
- name: Prometheus
type: prometheus
Expand Down
3 changes: 3 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Expand Up @@ -634,6 +634,9 @@ grafana:
enabled: true
defaultDatasourceEnabled: true

# If not defined, will use prometheus.prometheusSpec.scrapeInterval or its default
# defaultDatasourceScrapeInterval: 15s

## Annotations for Grafana datasource configmaps
##
annotations: {}
Expand Down

0 comments on commit 49e8db1

Please sign in to comment.