-
Notifications
You must be signed in to change notification settings - Fork 44
WIP: k8s pods crawling interface, functions and reference implementation #246
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Tatsuhiro Chiba <[email protected]>
Signed-off-by: Tatsuhiro Chiba <[email protected]>
Signed-off-by: Tatsuhiro Chiba <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #246 +/- ##
=========================================
- Coverage 90.34% 89.15% -1.2%
=========================================
Files 98 101 +3
Lines 3492 3577 +85
=========================================
+ Hits 3155 3189 +34
- Misses 337 388 +51
Continue to review full report at Codecov.
|
Haven't looked much in detail yet, but could it be possible to tie this with existing |
@tatsuhirochiba, do we need a separate crawl mode for k8s objects ? adding new crawl mode for every k8s object doesn't seem right. For example, if user wants to crawl for 'replication controller' (multiple pods) or 'service' we would need to add new crawl mode for that? Can we add this k8s as a plugin? here, when crawling containers, we could use k8s downward API to get pod information about that container and then get query pod status? We could think how to avoid duplicate pod queries for multiple containers in pod. |
@sahilsuneja1 @nadgowdas Thanks for your very useful comments! First, the motivation of the k8s crawl mode is to collect system metrics (e.g. cpu/memory etc) and app metrics (e.g. redis, nginx, etc.) from k8s managed containers themselves, not from k8s objects (e.g. Services/Deployments/Replication Controllers etc.) In this context, the gap between k8s and outcontainer mode seems not so big because their crawling target is common (i.e. container), so that using k8s environment plugin to change crawling behavior is very reasonable approach. However, there exists several gaps, and probably they are not solved by using k8s environment plugin.
|
@tatsuhirochiba can you check this k8s downward API guide: It is possible to query POD properties from within a container, that we can extend in (not necessarily k8s environment plugin, but ) separate k8s crawler plugin This will help us identify gaps. |
Thanks @tatsuhirochiba for explaining the requirements and @nadgowdas for suggesting an alternative solution. Ideally, we would like to extend crawler via plugins instead of modifications to core, so if something does not fit the current plugin model, we change the plugin model hopefully :) |
Fix/issue60/peacocb uk
This PR is a part of #245 , which includes several functions, interfaces and an example redis pod crawling plugin.
The modules are working well on our local k8s environment, but I have not added test cases yet.