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

Use resource for CNPs and CCNPs #24509

Merged
merged 3 commits into from
Mar 31, 2023

Commits on Mar 30, 2023

  1. k8s: Add shared resources for CNPs and CCNPs

    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>
    pippolo84 committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    2ed7144 View commit details
    Browse the repository at this point in the history
  2. k8s: Use CNP shared resource in k8s watcher

    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>
    pippolo84 committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    c2011a1 View commit details
    Browse the repository at this point in the history
  3. k8s: Use CCNP shared resource in k8s watcher

    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>
    pippolo84 committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    bba8f78 View commit details
    Browse the repository at this point in the history