-
Notifications
You must be signed in to change notification settings - Fork 799
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
feat: remove the creation of cronjobs in cleanup controller #8526
feat: remove the creation of cronjobs in cleanup controller #8526
Conversation
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Does this take into consideration if the policy is updated to increase or decrease the time between the next reconciliation? |
Why not store |
If a new cleanup policy is created, then the policy needs to be executed at least once to have
No. In case |
Take creationTime in this case ;) |
@chipzoller - Now, if |
99c1b76
to
2bebbf8
Compare
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Codecov Report
@@ Coverage Diff @@
## main #8526 +/- ##
==========================================
- Coverage 35.78% 35.65% -0.14%
==========================================
Files 313 313
Lines 25049 25143 +94
==========================================
Hits 8965 8965
- Misses 15194 15288 +94
Partials 890 890
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The logic to get last execution time should be part of the interface imho. |
/cherry-pick release-1.11 |
* feat: remove the creation of cronjobs in cleanup controller Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * fix: use lastExecutionTime instead of nextExecutionTime Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> --------- Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
…8528) * feat: remove the creation of cronjobs in cleanup controller * fix: use lastExecutionTime instead of nextExecutionTime --------- Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
…8526) * feat: remove the creation of cronjobs in cleanup controller Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * fix: use lastExecutionTime instead of nextExecutionTime Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> --------- Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Explanation
This PR removes the usage of cronjob in the cleanup controller. Instead the policy is requeued with a delay.
The reconciliation function do the following:
In case
spec.schedule
is modified, then the next execution time is re-calculated with the new value ofspec.schedule
.Fixes #8306
Fixes #8073