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

🤖 Sync from open-cluster-management-io/config-policy-controller: #96 #397

Merged
merged 1 commit into from
Jan 20, 2023

Commits on Jan 20, 2023

  1. Clean up when deployment is being deleted

    Previously, when the controller is removed, it could leave a mess behind
    in the form of ConfigurationPolicy objects with finalizers on them. That
    would also result in the CRD being stuck.
    
    Now, the controller will put a finalizer on its own deployment when at
    least one ConfigurationPolicy has a finalizer. Also, while the
    deployment is being deleted, the finalizers on ConfigurationPolicies
    will be removed immediately, in the same way they would be when the CRD
    was being deleted.
    
    Note: in this implementation, related objects might *never* be pruned
    when the controller is removed.
    
    Since the controller deployment is in a different namespace than the
    ConfigutaionPolicies it watches, the controller's cache cannot be
    limited to a single namespace the way it was before. Instead, this uses
    additional cache selectors to limit watches on ConfigurationPolicies
    and Deployments to the relevant namespaces.
    
    Refs:
     - https://issues.redhat.com/browse/ACM-2923
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    (cherry picked from commit e60e939)
    JustinKuli authored and Magic Mirror committed Jan 20, 2023
    Configuration menu
    Copy the full SHA
    fe2387f View commit details
    Browse the repository at this point in the history