Add a function to get ip address for metrics crawler in k8s environment#335
Add a function to get ip address for metrics crawler in k8s environment#335sahilsuneja1 merged 1 commit intocloudviz:masterfrom
Conversation
9c90e61 to
51b2d63
Compare
Codecov Report
@@ Coverage Diff @@
## master #335 +/- ##
==========================================
+ Coverage 88.48% 88.69% +0.21%
==========================================
Files 117 117
Lines 4742 4867 +125
==========================================
+ Hits 4196 4317 +121
- Misses 546 550 +4
Continue to review full report at Codecov.
|
|
@tatsuhirochiba: Looks good. Can you please clarify the following:
|
|
For 1: At first, ip address is hidden from app container's docker inspect and some meaningful information are shown in pause container's docker inspect, so I was thinking about the following approaches. a) preparing pod crawling mode (issued at #246) option c) can minimize code change than option a) and b). For 2: For 3: Thanks for nice info, I did not check some useful util code ( We just try to use these utility code inside app metrics crawling plugin. |
|
Thanks for the clarifications @tatsuhirochiba! |
|
@hitomitak will make nsenter version and then revise this PR, so we do not need to merge current KUBE_POD_INFO version, thanks! |
|
I'm sorry @hitomitak and @tatsuhirochiba. I just realized I did not tag the right person in my original comment and ended up following up with the wrong committer! :) |
b30859c to
0959ee5
Compare
Signed-off-by: hitomitak <hitomi@jp.ibm.com>
|
Thank you for the nice advice @sahilsuneja1 |
|
Thanks @hitomitak ! |
This PR adds a function to get ip address in K8S environment for metrics crawler.
The detail information about metrics crawler is described at issue #196
IP address is not assigned to each docker and it is not included in docker inspect information (
c.get_container_ip()) in k8s. So we pass IP address to the crawler by env variable (KUBE_POD_INFO) .Signed-off-by: Hitomi Takahashi hitomi@jp.ibm.com