-
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
Require goplugin build flag to enable go plugin support #6393
Conversation
Thanks for the update. |
(cherry picked from commit 776e92f)
@danielnelson I'm working on a way to build our internal plugins and package them into the telegraf docker container. Correct me if I'm wrong, but it sounds like the docker container won't include a build of telegraf that supports plugins. I was hoping to build on top of the existing container, insert my plugins/conf files, and repackage. With this PR, it sounds like I need to separately build/host/support a telegraf binary/container if I want plugin support. Is that correct? If so, any chance of Influx making a separate docker container with a telegraf binary that supports plugins as part of the release cycle? |
That is true, you will need to make an entirely new docker container. I'm not sure we would want to package a docker container with this feature, since there are a bunch of requirements that have to line up between the Telegraf build and the plugin build: Go compiler version, GOPATH, CGO_ENABLED, and potentially other details. I wonder if it can be made compatible enough where it can be taken and reused without issue. That said, I think we would be willing to add an AMD64 .deb/.rpm package with the tag enabled and you could also open a new issue for the docker image and we can see what sort of demand there is. |
Thanks, a package that enables plugin support would also be welcome. I've opened this to request it: #7003 |
And I've opened this for the docker container: influxdata/influxdata-docker#369 |
) (cherry picked from commit 776e92f)
It has come to my attention that the Go plugin support added in #6024 had an unexpected and hefty cost in terms of binary size, to the tune of about 19MB.
Despite this feature been released in 1.12, I propose we add a build flag and disable it on official Telegraf builds. Based on my testing of this feature, it is quite difficult to get plugins working without building the plugin and Telegraf together on the same host, and the extra binary size is just too much for a feature that will be rarely used.
To build with Go plugin support add
-tags goplugin
to the build command:Required for all PRs: