-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix(outputs.opensearch): Expose TLS setting correctly #14340
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, otherwise all fine!
Co-authored-by: Thomas Casteleyn <[email protected]>
@@ -43,9 +43,17 @@ | |||
# auth_bearer_token = "" | |||
|
|||
## Optional TLS Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about including it with {{template "/plugins/common/tls/client.conf"}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was an issue with it but I don't remember what it was... Will take another look...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be done like that with the http input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: The issue is that the config contains Golang templates itself e.g. in the documentation of the index_name option
. So the suggested replacement will try to fill in those templates as well and will fail to do so.
2023/11/27 15:23:01 Executing template failed: template: sample.conf.in:13:46: executing "sample.conf.in" at <.Tag>: Tag is not a method but has arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, these would need to be escaped then in that case.
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
resolves #14334
This PR exposes the
insecure_skip_verify
option correctly by embeddingcommontls.TLSConfig
(instead of the full HTTP option set). By doing so, we also expose all other TLS options reflected by thesample.conf
update.