-
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
feat(inputs.kube_inventory): Support filtering pods and nodes by node name #13993
feat(inputs.kube_inventory): Support filtering pods and nodes by node name #13993
Conversation
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
@Noy-Simon first of all thank you for your contribution! It see like this PR does two things at the same time, filtering by name and getting the data from kubelet. It is better to have one PR per feature if possible to easier track down problems and revert changes if they do have unintended side-effects. I think in your case splitting the two is possible, so please submit one PR with the filtering and one PR with getting the the data from kubelet. |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Thanks for the split @Noy-Simon! One suggestion in the code from my side...
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.
Thanks for your work @Noy-Simon!
## Node name to filter to. No filtering by default. | ||
# node_name = "" |
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.
How do you plan on using this? Do you have a plugin for every single node you want to monitor? My concern is how does that scale?
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.
i use it as a daemonset and give it a node name using an env var from Kubernetes fieldPath: spec.nodeName
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.
So each daemonset is monitoring a single node? Is there a scenario where someone wants to pass multiple nodes?
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.
not that i can think of
monitoring multiple nodes and not all nodes will require the client to use permanent node names and its a bad practice
maybe in the future, someone would want to add some kind of prefix search but it will not be as efficient
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.
ok thanks!
resolves #13878
superseeds #13893
Add the option to filter nodes and pods by node name in the kuberetes_inventory input plugin