Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[telegraf] optional alternative config templates #441

Merged

Conversation

alespour
Copy link
Contributor

@alespour alespour commented Mar 16, 2022

This PR adds alternative config templates for aggregators, processors, inputs and outputs.

There have been a few issues so far where existing templates fail to render valid configuration elements (#433, #429, #375, #119, #111 etc). Existing templates are written with nesting that attempts to match generated output (especially for inputs), but it is insufficient and becomes difficult to maintain.

The new set of templates use one common recursive template that handles nesting without limits. The feature can be activated by setting tplVersion to 2 (either via --set helm option or as an entry in values file).

Config examples from the above mentioned issues are all together in charts/telegraf/ci/complex-values.yaml file and have been tested. The resulting telegraf.conf is valid and Telegraf runs with it.

Hopefully the new templates will support greater variety of yaml configs than existing templates. It may reduce the need to have an option to specify raw config (#358). But why not have both.

--

There is also a small amendment to workflow in this PR: after charts are tested (with success), logs are checked for messages that represent severe errors. In case of telegraf chart, when config file is invalid and Telegraf actually fails to start, ct install check result is success nevertheless.

@alespour alespour marked this pull request as ready for review March 16, 2022 13:37
@tomklapka tomklapka merged commit b45cba4 into influxdata:master Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants