influxdata / influxdata/helm-charts
[telegraf-ds] Single bracket for single element in map list interface
- Dominant language
- Mustache
- Stars
- 257
- Forks
- 347
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
**Telegraf-ds Helm chart version: 1.1.32
Telegraf Docker image 1.29-alpine
Amazon Linux on EKS**
I'm trying to put processors.converter in telegraf-ds configuration.
On this processors I want to convert tags to fields, for exemple the expected config will be :
```
[[processors.converter]]
namepass = ["ping"]
[processors.converter.tags]
string = [
"host",
"name",
"url"
]
```
For this, configuration on YAML for telegraf-ds is:
```
config:
# [...]
inputs:
processors:
- converter:
namepass:
- ping
tags:
string:
- host
- name
- url
```
With the actual template for telegraf-ds the result is :
```
[[processors.converter]]
namepass = ["ping"]
[[processors.converter.tags]]
string = [
"host"
"name",
"url"
]
```
Two problems here:
1. processors.converter.tags have two bracket and not one (https://github.com/influxdata/helm-charts/blob/telegraf-ds-1.1.32/charts/telegraf-ds/templates/_helpers.tpl#L228)
2. first element of string list don't have comma
---
I've check on telegraf template and it's good. An If statement is in place for used single bracket with converter, override, clone and two brackets for other (https://github.com/influxdata/helm-charts/blob/telegraf-1.8.51/charts/telegraf/templates/_helpers.tpl#L342)
After check all templates and part, 3 syntaxe is present for manage map string interface :
- In telegraf-ds, processors, no statement only two brackets (https://github.com/influxdata/helm-charts/blob/telegraf-ds-1.1.32/charts/telegraf-ds/templates/_helpers.tpl#L228)
- In telegraf, processors, an if statement for single map list and for map list in 2 level (https://github.com/influxdata/helm-charts/blob/telegraf-1.8.51/charts/telegraf/templates/_helpers.tpl#L342)
- In telegraf and telegraf-ds, inputs, check if map list contain values to used two brackets and if not single brackets (https://github.com/influxdata/helm-charts/blob/telegraf-1.8.51/charts/telegraf/templates/_helpers.tpl#L204)
---
Can you used one if statement on processors in telegraf-ds for allow processors.converter ?
Contributor guide
Research direction
Start in charts/telegraf-ds/templates/_helpers.tpl around line 228 and compare the processor handling with charts/telegraf/templates/_helpers.tpl around line 342. Render the telegraf-ds configuration using the processors.converter example and verify that nested tags use one bracket level and the string list is comma-separated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100