Unverified Commit ff5171e5 authored by anachristofaro's avatar anachristofaro Committed by GitHub

Fix - Issue #307 (#308)

* Fix - Issue #307 * Update Chart.yaml Co-authored-by: 's avatartimhallinflux <timhallinflux@users.noreply.github.com>
parent 90681f8c
apiVersion: v2
name: telegraf
version: 1.8.0
version: 1.8.1
appVersion: 1.18.3
deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
......
......@@ -318,7 +318,30 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- range $key, $value := $config -}}
{{- $tp := typeOf $value -}}
{{- if eq $tp "map[string]interface {}" }}
[[processors.{{ $processor }}.{{ $key }}]]
{{- if or (eq $processor "converter") (eq $processor "override") (eq $processor "clone") }}
[processors.{{ $processor }}.{{ $key }}]
{{- range $k, $v := $value }}
{{- $tps := typeOf $v }}
{{- if eq $tps "string" }}
{{ $k }} = {{ $v | quote }}
{{- end }}
{{- if eq $tps "[]interface {}"}}
{{ $k }} = [
{{- $numOut := len $v }}
{{- $numOut := sub $numOut 1 }}
{{- range $b, $val := $v }}
{{- $i := int64 $b }}
{{- if eq $i $numOut }}
{{ $val | quote }}
{{- else }}
{{ $val | quote }},
{{- end }}
{{- end }}
]
{{- end }}
{{- end }}
{{- else }}
[[processors.{{ $processor }}.{{ $key }}]]
{{- range $k, $v := $value }}
{{- $tps := typeOf $v }}
{{- if eq $tps "string" }}
......@@ -359,6 +382,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{ end }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment