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

fix: always set RequeueAfter when reconciling CIS #198

Merged
merged 4 commits into from
Feb 10, 2023

Conversation

erikgb
Copy link
Member

@erikgb erikgb commented Feb 9, 2023

We've had issues with the rescan logic as it seems like all/most CIS resources are reconciled when the operator is restarted. This is very unfortunate, especially in large clusters, resulting is a resource consumption burst.

@bendikp has performed some testing locally, and it seems like our logic for returning RequeueAfter when reconciling CIS must always be set. We assumed that we were "saved" by the default 10h SyncPeriod, but it seems like the sync events are filtered out - probably by the generation-changed predicate.

This PR tries to use predicates to highlight the two difference scan/rescan paths: scan/rescan because of CIS spec change (generation changed) OR rescan due (time based).

@erikgb erikgb requested a review from a team as a code owner February 9, 2023 21:54
@erikgb erikgb force-pushed the improve-requeue-logic branch from a004bef to 6054607 Compare February 10, 2023 07:57
@erikgb erikgb requested a review from padlar February 10, 2023 10:16
padlar
padlar previously approved these changes Feb 10, 2023
Copy link
Contributor

@padlar padlar left a comment

Choose a reason for hiding this comment

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

lgtm

@erikgb erikgb enabled auto-merge (squash) February 10, 2023 12:02
@erikgb erikgb merged commit ad8d921 into statnett:main Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants