Skip to content

Commit

Permalink
[kube-prometheus-stack] feat: configure datasource auto-deletion (#4771)
Browse files Browse the repository at this point in the history
  • Loading branch information
stijzermans authored Aug 5, 2024
1 parent dc28578 commit 5657a6c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 61.7.0
version: 61.7.1
appVersion: v0.75.2
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ data:
{{- if .Values.grafana.deleteDatasources }}
deleteDatasources:
{{ tpl (toYaml .Values.grafana.deleteDatasources | indent 6) . }}
{{- end }}
{{- if .Values.grafana.prune }}
prune: {{ .Values.grafana.prune }}
{{- end }}
datasources:
{{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }}
Expand Down
5 changes: 5 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,11 @@ grafana:
# url: https://{{ printf "%s-prometheus.svc" .Release.Name }}:9090
# version: 1

# Flag to mark provisioned data sources for deletion if they are no longer configured.
# It takes no effect if data sources are already listed in the deleteDatasources section.
# ref: https://grafana.com/docs/grafana/latest/administration/provisioning/#example-data-source-config-file
prune: false

## Passed to grafana subchart and used by servicemonitor below
##
service:
Expand Down

0 comments on commit 5657a6c

Please sign in to comment.