Skip to content

Commit 65da3d8

Browse files
authored
feat: render remoteWrite if config.useTpl is enabled (#2584)
1 parent cc87dac commit 65da3d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

charts/victoria-metrics-agent/templates/_helpers.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040
{{- range $i, $rw := $Values.remoteWrite }}
4141
{{- range $rwKey, $rwValue := $rw }}
4242
{{- if or (kindIs "slice" $rwValue) (kindIs "map" $rwValue) }}
43-
{{- $_ := set $rwcm (printf "%d-%s.yaml" $i $rwKey) (toYaml $rwValue) }}
43+
{{- $rwContent := toYaml $rwValue }}
44+
{{- if $Values.config.useTpl }}
45+
{{- $rwContent = tpl $rwContent $ | trim }}
46+
{{- end }}
47+
{{- $_ := set $rwcm (printf "%d-%s.yaml" $i $rwKey) $rwContent }}
4448
{{- end -}}
4549
{{- end -}}
4650
{{- end -}}

0 commit comments

Comments
 (0)