Skip to content

Commit d27d28d

Browse files
k8s-stack: fix plugins section in GrafanaDatasource (#2178)
* k8s-stack: fix plugins section in GrafanaDatasource * bump chart version, renamed property name --------- Co-authored-by: Andrii Chubatiuk <[email protected]> Co-authored-by: Andrii Chubatiuk <[email protected]>
1 parent 546a2bf commit d27d28d

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

charts/victoria-metrics-k8s-stack/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Next release
22

3-
- TODO
3+
- add plugin version while using GrafanaDatasource CRD
44

55
## 0.47.0
66

charts/victoria-metrics-k8s-stack/Chart.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ apiVersion: v2
22
name: victoria-metrics-k8s-stack
33
description: Kubernetes monitoring on VictoriaMetrics stack. Includes VictoriaMetrics Operator, Grafana dashboards, ServiceScrapes and VMRules
44
type: application
5-
version: 0.47.0
5+
version: 0.47.1
66
appVersion: v1.117.0
7-
sources:
87
- https://github.com/VictoriaMetrics/helm-charts
98
icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4
109
kubeVersion: ">=1.25.0-0"

charts/victoria-metrics-k8s-stack/templates/grafana/datasource.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ metadata:
2222
{{- $_ := set $spec "datasource" $ds }}
2323
{{- $_ := set $ctx "ds" $ds }}
2424
{{- if eq (include "vm.data.source.enabled" $ctx) "false" -}}
25-
{{- $_ := set $spec "plugins" (list $ds.type) }}
25+
{{- $_ := set $spec "plugins" (list (dict "name" $ds.type "version" $ds.version)) }}
2626
{{- end }}
27+
{{- $_ := unset $ds "version" }}
2728
spec: {{ toYaml $spec | nindent 2 }}
2829
{{- end }}
2930
{{- else }}
3031
{{- $datasources := default list }}
3132
{{- range $ds := $output.datasources }}
3233
{{- $_ := set $ctx "ds" $ds }}
3334
{{- if eq (include "vm.data.source.enabled" $ctx) "true" -}}
35+
{{- $_ := unset $ds "version" }}
3436
{{- $datasources = append $datasources $ds }}
3537
{{- end -}}
3638
{{- end }}

charts/victoria-metrics-k8s-stack/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ defaultDatasources:
845845
isDefault: false
846846
access: proxy
847847
type: victoriametrics-metrics-datasource
848+
version: "0.14.0"
848849
# -- List of alertmanager datasources.
849850
# Alertmanager generated `url` will be added to each datasource in template if alertmanager is enabled
850851
alertmanager:

0 commit comments

Comments
 (0)