Skip to content

Commit

Permalink
[kube-prometheus-stack]: fix to make sure that 'grafana.sidecar.datas… (
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiangaiser authored Jul 1, 2024
1 parent ab2f3e8 commit 41a8b07
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
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.1.0
version: 61.1.1
appVersion: v0.75.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
6 changes: 6 additions & 0 deletions charts/kube-prometheus-stack/ci/03-non-defaults-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ kubeProxy:
matchLabels:
k8s-app: kube-proxy

grafana:
sidecar:
datasources:
alertmanager:
name: 0

nodeExporter:
enabled: true
forceDeployDashboards: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data:
datasources:
{{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }}
{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }}
- name: {{ .Values.grafana.sidecar.datasources.name }}
- name: "{{ .Values.grafana.sidecar.datasources.name }}"
type: prometheus
uid: {{ .Values.grafana.sidecar.datasources.uid }}
{{- if .Values.grafana.sidecar.datasources.url }}
Expand All @@ -45,7 +45,7 @@ data:
{{- end }}
{{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }}
{{- range until (int .Values.prometheus.prometheusSpec.replicas) }}
- name: {{ .Values.grafana.sidecar.datasources.name }}-{{ . }}
- name: "{{ $.Values.grafana.sidecar.datasources.name }}-{{ . }}"
type: prometheus
uid: {{ $.Values.grafana.sidecar.datasources.uid }}-replica-{{ . }}
url: http://prometheus-{{ template "kube-prometheus-stack.prometheus.crname" $ }}-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }}
Expand All @@ -61,7 +61,7 @@ data:
{{- end }}
{{- end }}
{{- if .Values.grafana.sidecar.datasources.alertmanager.enabled }}
- name: {{ .Values.grafana.sidecar.datasources.alertmanager.name }}
- name: "{{ .Values.grafana.sidecar.datasources.alertmanager.name }}"
type: alertmanager
uid: {{ .Values.grafana.sidecar.datasources.alertmanager.uid }}
{{- if .Values.grafana.sidecar.datasources.alertmanager.url }}
Expand Down

0 comments on commit 41a8b07

Please sign in to comment.