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

Reduce number of related InstallPlans #239

Conversation

JustinKuli
Copy link
Member

Previously, the operator policy controller would list all InstallPlans in the subscription namespace and filter down to ones it considered relevant. Among other things, it used OwnerReferences to do this filtering, but those are inconsistently applied by OLM.

Now, it only looks at InstallPlans labelled specifically for the subscription in the policy, which seems to be much more reliably set and updated by OLM. Generally, only one InstallPlan will have the label, which makes it more possible to unambiguously assign a compliance to it based on its phase (previously, it was unclear what to assign to "historic" InstallPlans).

Much of the controller logic still handles the possibility of there being multiple relevant InstallPlans, for robustness.

Refs:

Previously, the operator policy controller would list all InstallPlans
in the subscription namespace and filter down to ones it considered
relevant. Among other things, it used OwnerReferences to do this
filtering, but those are inconsistently applied by OLM.

Now, it only looks at InstallPlans labelled specifically for the
subscription in the policy, which seems to be much more reliably set and
updated by OLM. Generally, only one InstallPlan will have the label,
which makes it more possible to unambiguously assign a compliance to it
based on its phase (previously, it was unclear what to assign to
"historic" InstallPlans).

Much of the controller logic still handles the possibility of there
being multiple relevant InstallPlans, for robustness.

Refs:
 - https://issues.redhat.com/browse/ACM-11025

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
Copy link

openshift-ci bot commented May 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, mprahl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit c636d7d into open-cluster-management-io:main May 15, 2024
9 checks passed
@JustinKuli JustinKuli deleted the 11025-only-one-installplan branch July 25, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants