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

Move the disabled events recording outside of spec-sync #132

Merged

Conversation

mprahl
Copy link
Member

@mprahl mprahl commented Apr 15, 2024

Note, this is the related PR in the propagator: open-cluster-management-io/governance-policy-propagator#215

There were issues with duplicated compliance events and having a different code path in the governance-policy-propagator for a self-managed hub. This will unifies the approaches.

It takes the approach of using a retry watcher and just generating the disabled event when the policy is deleted. The controller-runtime library cannot be used because when there is a reconcile event for a deleted object, you don't have access to the object as it was right before deletion.

Relates:
https://issues.redhat.com/browse/ACM-10418

@mprahl mprahl requested a review from JustinKuli April 15, 2024 19:30
@openshift-ci openshift-ci bot requested a review from dhaiducek April 15, 2024 19:30
mprahl added a commit to mprahl/governance-policy-propagator-1 that referenced this pull request Apr 15, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
mprahl added a commit to mprahl/governance-policy-propagator-1 that referenced this pull request Apr 15, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
dhaiducek
dhaiducek previously approved these changes Apr 15, 2024
Copy link
Member

@dhaiducek dhaiducek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold LGTM! Holding for other reviews (or if merge coordination is needed).

@mprahl
Copy link
Member Author

mprahl commented Apr 16, 2024

@dhaiducek thanks for the review Dale! After thinking about this, I think I need to guarantee the watch starts from a point before the spec-sync starts in order to not miss and delete policy events. I'll address that in a bit.

/hold

There were issues with duplicated compliance events and having a
different code path in the governance-policy-propagator for a
self-managed hub. This will unifies the approaches.

It takes the approach of using a retry watcher and just generating
the disabled event when the policy is deleted. The controller-runtime
library cannot be used because when there is a reconcile event for a
deleted object, you don't have access to the object as it was right
before deletion.

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
@mprahl
Copy link
Member Author

mprahl commented Apr 16, 2024

/unhold

Copy link

openshift-ci bot commented Apr 18, 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 5dd1a53 into open-cluster-management-io:main Apr 18, 2024
9 checks passed
mprahl added a commit to open-cluster-management-io/governance-policy-propagator that referenced this pull request Apr 18, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
magic-mirror-bot bot pushed a commit to stolostron/governance-policy-propagator that referenced this pull request Apr 18, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
(cherry picked from commit 0a78fa3)
magic-mirror-bot bot pushed a commit to stolostron/governance-policy-propagator that referenced this pull request Apr 18, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
(cherry picked from commit 0a78fa3)
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/governance-policy-propagator that referenced this pull request Apr 18, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
(cherry picked from commit 0a78fa3)
openshift-merge-bot bot pushed a commit to stolostron/governance-policy-propagator that referenced this pull request Apr 18, 2024
This is now handled in the governance-policy-framework-addon:
open-cluster-management-io/governance-policy-framework-addon#132

Relates:
https://issues.redhat.com/browse/ACM-10418

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
(cherry picked from commit 0a78fa3)
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.

3 participants