-
Notifications
You must be signed in to change notification settings - Fork 375
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
Add Registration logic for Pod Info Custom Resource Definition. #1369
Add Registration logic for Pod Info Custom Resource Definition. #1369
Conversation
@prateek041 could you take a look at this failure https://github.com/cilium/tetragon/actions/runs/5904686326/job/16017296464?pr=1369 you probably just need to run |
sure let me do that. I am quite sure I did it though. |
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
i'll look into what's causing these failure today. moving it to draft for now |
8588fe8
to
a79180a
Compare
ok this should be good to go. @prateek041 could you update the commit message to explain why we need this CRD, also linking to this github issue? #794 then mark it ready for review 🚀 |
a79180a
to
dd97bb8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The structure of the new object looks good to me, but I have some small comments in the code details.
dd97bb8
to
3b4269c
Compare
I think I am not understanding one very basic thing about coding in Go. Why do I get these vendoring issues out of nowhere ? What are the practices I should use to avoid these ? |
I'm not sure what the underlying reason is, but one thing that you can do is:
|
3b4269c
to
e81dd9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It seems to me that we are still using the old naming, so it would be nice to be consistent.
I also have a suggestion on how to refactor createCRD.
vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/register_v1_crd.go
Outdated
Show resolved
Hide resolved
10c7aad
to
c9e7537
Compare
c9e7537
to
6df51ad
Compare
6df51ad
to
bcd7caf
Compare
pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfoes.yaml
Outdated
Show resolved
Hide resolved
bcd7caf
to
5c4ad17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm minor nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have a question and a minor nit.
I'm OK with using the same plural name as the singular if it's OK with @michi-covalent.
If the Unwrap is unnecessary, please remove it. If it is needed, please let me know why.
Other than that, everything LGTM so I will pre-approve.
Awesome work! 🚀
7c5a2c9
to
2ca3c62
Compare
Currently tetragon uses cilium Endoints to get Pod Labels. Pod Info CRD is a mapping between Pod IPs and Pod metadata therefore, instead of using cilium endpoints, it can use the pod info CRs, hence removing the dependency on cilium. This commit: - Added flag to skip PodInfo CRD in the operator, tetragon will use endpoints in this case. - Integrated logic to register the PodInfo CRD with the API server, similar to tracing Policies CRD. Signed-off-by: Prateek Singh <prateeksingh9741@gmail.com> Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
2ca3c62
to
7e03785
Compare
Currently tetragon uses cilium Endoints to get Pod Labels. Pod Info CRD is a mapping between Pod IPs and Pod metadata therefore, instead of using cilium endpoints, it can use the pod info CRs, hence removing the dependency on cilium.
This PR: