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

Cleanup unnecessary cilium/cilium dependencies #2651

Open
lambdanis opened this issue Jul 9, 2024 · 3 comments
Open

Cleanup unnecessary cilium/cilium dependencies #2651

lambdanis opened this issue Jul 9, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@lambdanis
Copy link
Contributor

lambdanis commented Jul 9, 2024

I used gomod to check how Tetragon depends on cilium/cilium Go packages. Here we go:

gomod graph --style cluster=full -p 'deps(github.com/cilium/tetragon/**, 1) inter rdeps(github.com/cilium/cilium/**, 1)' > tetragon-cilium.dot && dot -Tpng -o tetragon-cilium.png tetragon-cilium.dot

tetragon-cilium
(To make it clear - these are dependencies in Go code only. Tetragon doesn't have runtime dependencies on Cilium).

Many of these are just small helpers imported from cilium/cilium for historical reasons. We should review them and remove unnecessary dependencies. If Tetragon is importing a package from cilium/cilium just to use a small helper, it might make sense to write such helper inside Tetragon codebase.

Some cilium/cilium dependencies were removed already in #794/#2580, but there are several remaining. What's particularly problematic are transitive dependencies of k8s libraries via cilium/cilium. Because not all interfaces are stable, this means version of k8s libraries is tied to cilium/cilium version. Here's a graph of such dependencies:

gomod graph --style cluster=full -p 'deps(github.com/cilium/tetragon/**, 1) inter rdeps(github.com/cilium/cilium/**, 1) inter (rdeps(k8s.io/**) + rdeps(sigs.k8s.io/**))' > tetragon-cilium-k8s.dot && dot -Tpng -o tetragon-cilium-k8s.png tetragon-cilium-k8s.dot

tetragon-cilium-k8s

@mtardy
Copy link
Member

mtardy commented Jul 23, 2024

Another dependency that is not great is within the bpf package #2717 (comment).

@yashathwani
Copy link

Would like to work on this issue could you please assign it to me !!

@mtardy
Copy link
Member

mtardy commented Aug 2, 2024

Would like to work on this issue could you please assign it to me !!

sure go ahead, please feel free to ask questions. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

4 participants