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
Use resource for CNPs and CCNPs #24509
Use resource for CNPs and CCNPs #24509
Conversation
4c535fe
to
1c4b00e
Compare
/test |
1c4b00e
to
6f174b7
Compare
/test Job 'Cilium-PR-K8s-1.25-kernel-4.19' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
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.
PR mostly LGTM, just a few comments below.
I was also wondering: could we make a generic version of onUpsert[C]CNP()
given that the code inside is pretty much the same?
6f174b7
to
65a8f62
Compare
Actually the underlying type used by both |
0f59845
to
dcabd69
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.
🎉
kubernetes-e2e failure seems a flake, tracked it here. |
/test-1.26-net-next |
/test-1.25-4.19 Job 'Cilium-PR-K8s-1.25-kernel-4.19' hit: #24648 (86.61% similarity) |
Add Cilium Network Policies and Cilium Clusterwide Network Policies as shared resources in the proper cell. With this, the resources events are managed more efficiently thanks to the single informer plus workqueue for each resource type coupled with the subscriber events queue. Also, this will make the modularization and testing of all subsystems that depend on CNPs or CCNPs events easier. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Refactor the k8s watchers code to rely on the Cilium Network Policy shared resource instead of starting a new Informer. Starting a new informer increases the load on api server and without a workqueue, the handlers will block the events streaming until completion. The usage of the CNP shared resource solves this issues. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Refactor the k8s watchers code to rely on the Cilium Clusterwide Network Policy shared resource instead of starting a new Informer. Starting a new informer increases the load on api server and without a workqueue, the handlers will block the events streaming until completion. The usage of the CCNP shared resource solves this issues. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
dcabd69
to
bba8f78
Compare
/test Edit: net-next hit #24573 |
/test-1.26-net-next |
2 similar comments
/test-1.26-net-next |
/test-1.26-net-next |
Add Cilium Network Policies and Cilium Clusterwide Network Policies as shared resources in the proper cell.
With this, the resources events are managed more efficiently thanks to the single informer plus workqueue for each resource type, coupled with the subscriber events queue.
Also, this will make the modularization and testing of all subsystems that depend on CNPs or CCNPs events easier.