Description
Hi, I've noticed that the chart for Telegraf includes some default values for inputs, outputs, and processors, e.g.:
helm-charts/charts/telegraf/values.yaml
Lines 147 to 151 in 10fdfe9
However, we would like to be able to specify these as maps instead of lists. For example, we may want to have default values for a given output and then be able to override them per environment. If we specify this as a list, then we have to manually supply a full configuration for each environment. This can get really error prone and burdensome across multiple environments with multiple developers.
It seems like the configuration can be specified as a map (which would make sense given the range
function in Go/Helm) but we constantly get warnings like this when using a map:
coalesce.go:301: warning: destination for telegraf.telegraf.config.inputs is a table. Ignoring non-table value ([map[statsd:map[allowed_pending_messages:10000 metric_separator:_ percentile_limit:1000 percentiles:[50 95 99] service_address::8125]]])
coalesce.go:301: warning: destination for telegraf.telegraf.config.outputs is a table. Ignoring non-table value ([map[influxdb:map[database:telegraf urls:[http://influxdb.monitoring.svc:8086]]]])
coalesce.go:301: warning: destination for telegraf.telegraf.config.inputs is a table. Ignoring non-table value ([map[statsd:map[allowed_pending_messages:10000 metric_separator:_ percentile_limit:1000 percentiles:[50 95 99] service_address::8125]]])
coalesce.go:301: warning: destination for telegraf.telegraf.config.outputs is a table. Ignoring non-table value ([map[influxdb:map[database:telegraf urls:[http://influxdb.monitoring.svc:8086]]]])
coalesce.go:301: warning: destination for telegraf.telegraf.config.inputs is a table. Ignoring non-table value ([map[statsd:map[allowed_pending_messages:10000 metric_separator:_ percentile_limit:1000 percentiles:[50 95 99] service_address::8125]]])
coalesce.go:301: warning: destination for telegraf.telegraf.config.outputs is a table. Ignoring non-table value ([map[influxdb:map[database:telegraf urls:[http://influxdb.monitoring.svc:8086]]]])
This is probably due to trying to merge a map into a list - the list values end up being discarded. And while this is fine for now, we're wondering what potential changes to Go/Helm could cause problems in the future when trying this operation.
Any chance that inputs/outputs/processors could not have a list as a default specified? The ones in there right now don't seem to make sense anyway.