Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-11022

Consider more OperatorGroups as used when considering to remove them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • ACM 2.11.0
    • GRC
    • None
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2024-08
    • Moderate
    • No

       When working with a mustnothave OperatorPolicy, there is an option to only remove the OperatorGroup when it is not being used by any other subscriptions. However, the controller does not currently consider anything else that might have created or need the OperatorGroup. In particular, on OpenShift, if there are no other operators installed in the openshift-operators namespace (the default namespace for so-called global operators), then the operator policy controller might remove the default OperatorGroup in that namespace which OLM/Openshift creates, which is probably not what a user would want.

       

      I believe the easy way to implement this would be to check if the OperatorGroup has any OwnerReferences (the specific group above is owned by the ClusterVersion), and if there are any owners, consider the group as used by something else, and do not remove it when `spec.removalBehavior.operatorGroups = DeleteIfUnused`.

              jkulikau@redhat.com Justin Kulikauskas
              jkulikau@redhat.com Justin Kulikauskas
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: