-
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
feature(kubernetes plugin): Adds support for a kuberentes plugin #635
Conversation
fixes influxdata#569 This commit also refactors the existing docker plugin so that the kubernetes plugin can gather metrics from the docker system.
ok not sure why its failing on building the binary. The kubernetes dep was downloaded it seems. edit: nevermind it does download the repo it just takes a while |
@sparrc im not sure whats going on here. Does |
so I think the test failures are because it hasnt fully downloaded the kubernetes repo and its trying to go ahead and build the telegraf client. Not sure how to proceed |
@jchauncey I'll checkout your changes and take a look |
I get this error:
it seems like there are dependency issues here....tip of master docker parsers doesn't have that function: https://github.com/docker/docker/blob/master/pkg/parsers/parsers.go |
Yeah you need the sha that is pinned for the docker/docker repo in go deps
|
Is adding 14 new dependencies really the only way to get the kubernetes tags? Isn't there some kind of simple API to get the same information without all of these huge client libraries? Adding this PR will also require hand-editing the Godeps file from now on |
No this is the crappy thing about talking to the kube api. We've been
|
Sorry I didn't answer your question. Yes this is really the only way to talk to the kube api without using kubectl |
It built fine for me on OSX, but this change also increases the size of the binary by 63% (from 32M to 52M). I'm really not sure this is something that I want part of the Telegraf repo, I'll have to think on it. unfortunate that the kubernetes api is so cumbersome, given the circumstances I wouldn't be opposed to having this plugin require the kubectl binary as a dependency and executing that. |
@sparrc going to give the repo at the bottom of this issue a try tomorrow kubernetes/kubernetes#11606 |
interesting that the Go authors are maintaining a Kubernetes api library, hopefully it has enough capabilities for this plugin 👍 |
So we have decided we are going to spend some time and see if we can build a light weight kubernetes api for people to use. Seems like the right thing to do since a lot of people are needing one. I'll update the PR when we get it done. |
great! 💯 closing this PR for the time being then |
@jchauncey Any chance we can collaborate on that? I was about to do the same, starting from the link you posted... |
I think it might be fruitless now that I've spent a few days on it. If you If influx doesn't want to increase the size of the binary then I'll just
|
Ok, this means that problem must be addressed again in the kubernetes repo. It's not reasonable to have clients of Kubernetes that are that big. Thanks for the reply, anyway. |
@jchauncey what about the golang kubernetes library (https://godoc.org/golang.org/x/build/kubernetes)? Does that not have the ability to get kubernetes tags? |
It can get the labels but using it within an existing kube cluster is a
|
fixes #569
This commit also refactors the existing docker plugin so that the
kubernetes plugin can gather metrics from the docker system.