Open passing opened 1 year ago
given this minimal values.yaml file
values.yaml
config: aggregators: - starlark: source: "#" tagpass: my_tag: "hello" constants: my_constant: "hello"
rendering the template
helm repo add influxdata https://helm.influxdata.com/ helm template telegraf influxdata/telegraf --values values.yaml
the result includes the telegraf ConfigMap with the starlark aggregator
telegraf
[[aggregators.starlark]] source = "#" [[aggregators.starlark.constants]] my_constant = "hello" [aggregators.starlark.tagpass] my_tag = "hello"
that configuration won't be accepted by telegraf
2023-08-30T09:38:14Z E! error loading config file /etc/telegraf/telegraf.conf: error parsing starlark, line 19: (starlark.Starlark.Constants) cannot unmarshal TOML array table into map[string]interface {} (need slice)
the template handles tagpass and tagdrop separately here to create TOML inline tables instead of arrays of tables, so this probably needs to be extended to support starlark constants: https://github.com/influxdata/helm-charts/blob/master/charts/telegraf/templates/_helpers.tpl#L464
tagpass
tagdrop
given this minimal
values.yaml
filerendering the template
the result includes the
telegraf
ConfigMap with the starlark aggregatorthat configuration won't be accepted by telegraf
the template handles
tagpass
andtagdrop
separately here to create TOML inline tables instead of arrays of tables, so this probably needs to be extended to support starlark constants: https://github.com/influxdata/helm-charts/blob/master/charts/telegraf/templates/_helpers.tpl#L464