Skip to content
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

NETOBSERV-253 Enrich Host informations #196

Merged
merged 2 commits into from
May 9, 2022
Merged

Conversation

jpinsonneau
Copy link
Collaborator

@jpinsonneau jpinsonneau commented May 2, 2022

This PR adds HostName when available.
This will be usefull for topology grouping and ResourceLinks

image

@codecov-commenter
Copy link

Codecov Report

Merging #196 (ded3e9b) into main (0ad8917) will decrease coverage by 0.08%.
The diff coverage is 27.27%.

@@            Coverage Diff             @@
##             main     #196      +/-   ##
==========================================
- Coverage   58.13%   58.05%   -0.09%     
==========================================
  Files          58       58              
  Lines        3356     3366      +10     
==========================================
+ Hits         1951     1954       +3     
- Misses       1276     1282       +6     
- Partials      129      130       +1     
Flag Coverage Δ
unittests 58.05% <27.27%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/pipeline/transform/transform_network.go 60.00% <0.00%> (-0.84%) ⬇️
pkg/pipeline/transform/kubernetes/kubernetes.go 15.42% <37.50%> (+1.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ad8917...ded3e9b. Read the comment docs.

@@ -102,6 +103,7 @@ func (k *KubeData) GetInfo(ip string) (*Info, error) {
}

info.Owner = k.getOwner(info)
info.HostName = k.getHostName(info)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move this under the typePod case because you output only if HostIP is not empty --- here: https://github.com/netobserv/flowlogs-pipeline/pull/196/files#diff-77b720060ce5b2e61d001e832eac1bf4d94ffdeb9734bbd4ee678d9398ad3892R155

And this is set only for pods

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I was wondering if we could do the same for services but it can run on multiple pods / hosts and we'll need to manage arrays.

Let's keep it simple for now, thanks for the feedback 👍

@jpinsonneau jpinsonneau merged commit 19cfeb1 into netobserv:main May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants