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

feat(cil): add cilium plugin to read events off unix socket #570

Merged
merged 12 commits into from
Aug 20, 2024

Conversation

snguyen64
Copy link
Contributor

@snguyen64 snguyen64 commented Jul 29, 2024

Description

Added cilium plugin for retina-agent. This plugin will read events from cilium monitor socket, parse + decode to flow structs and send the events to our hubble instance

Related Issue

If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Tested on cilium cluster + retina-agent w/ cilium plugin. Run wget on bing.com and check metrics
Plugins enabled [cilium]
image

plugins enabled [cilium,dns]
image

Testing hubble-relay observe flows
image
on observe flow, pipe is broken on tcp4 when portforwarding, but flows show as expected otherwise

hubble-ui - shows flows/s but does not show service map
image

Testing on retina + hubble on non cilium (regression test)
2 node cluster
image

Plugins enabled
image
If we try to enable ciliumeventobserver on non cilium, it will crash
image

Hubble relay
image
hubble ui
image

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

@snguyen64 snguyen64 force-pushed the feat/cil-plugin branch 19 times, most recently from f865900 to 96beb2a Compare August 6, 2024 21:08
@snguyen64 snguyen64 marked this pull request as ready for review August 6, 2024 21:15
@snguyen64 snguyen64 requested a review from a team as a code owner August 6, 2024 21:15
Copy link
Contributor

@huntergregory huntergregory left a comment

Choose a reason for hiding this comment

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

Main question I have: should we retry if the socket connection is closed?

docs/metrics/plugins/intro.md Outdated Show resolved Hide resolved
pkg/hubble/common/decoder.go Outdated Show resolved Hide resolved
pkg/plugin/cilium/cilium_linux.go Outdated Show resolved Hide resolved
pkg/plugin/cilium/cilium_linux.go Outdated Show resolved Hide resolved
pkg/plugin/cilium/cilium_linux.go Outdated Show resolved Hide resolved
pkg/plugin/cilium/cilium_linux.go Outdated Show resolved Hide resolved
pkg/plugin/cilium/parser_linux.go Outdated Show resolved Hide resolved
pkg/plugin/cilium/parser_linux.go Outdated Show resolved Hide resolved
@snguyen64 snguyen64 force-pushed the feat/cil-plugin branch 3 times, most recently from 6a12c01 to 9dee9db Compare August 7, 2024 17:06
@snguyen64 snguyen64 added this pull request to the merge queue Aug 20, 2024
Merged via the queue into microsoft:main with commit 1b76e1d Aug 20, 2024
22 checks passed
@snguyen64 snguyen64 deleted the feat/cil-plugin branch August 20, 2024 19:48
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.

5 participants