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

feat: add a cleanup cronjob to delete urs #10249

Merged
merged 4 commits into from
May 29, 2024

Conversation

realshuting
Copy link
Member

@realshuting realshuting commented May 17, 2024

Explanation

This PR adds a cleanup cronjob to remove urs, the threshold is set to 10000 by default which can be configured via Helm.

Related issue

Closes #10244.
Related #10308.

Milestone of this PR

/1.12.3

Documentation (required for features)

My PR contains new or altered behavior to Kyverno.

What type of PR is this

Proposed Changes

Proof Manifests

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.
  • This is a feature and I have added CLI tests that are applicable.
  • My PR needs to be cherry picked to a specific release branch which is .
  • My PR contains new or altered behavior to Kyverno and
    • CLI support should be added and my PR doesn't contain that functionality.

Further Comments

Signed-off-by: ShutingZhao <shuting@nirmata.com>
Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.22%. Comparing base (a453959) to head (60f50ff).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10249   +/-   ##
=======================================
  Coverage   10.22%   10.22%           
=======================================
  Files        1031     1031           
  Lines       91905    91905           
=======================================
+ Hits         9395     9397    +2     
+ Misses      81481    81480    -1     
+ Partials     1029     1028    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: ShutingZhao <shuting@nirmata.com>
@realshuting
Copy link
Member Author

/cherry-pick release-1.12

Copy link
Collaborator

@KhaledEmaraDev KhaledEmaraDev left a comment

Choose a reason for hiding this comment

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

Should we delete all UpdateRequests or delete only those past the threshold? Like by age or something.

@realshuting
Copy link
Member Author

Should we delete all UpdateRequests or delete only those past the threshold? Like by age or something.

I delete all urs in this PR and rely on the force reconciliation to remediate any missing events.

@realshuting realshuting added this to the Kyverno Release 1.12.3 milestone May 29, 2024
@realshuting realshuting merged commit 084336c into kyverno:main May 29, 2024
243 of 253 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request May 29, 2024
Signed-off-by: ShutingZhao <shuting@nirmata.com>
@realshuting realshuting added the cherry-pick-completed The PR was cherry-picked (or merged) to required release branches label May 29, 2024
realshuting added a commit that referenced this pull request May 29, 2024
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-completed The PR was cherry-picked (or merged) to required release branches cherry-pick-required milestone 1.12.3 milestone 1.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add cleanup jobs to remove stale updaterequests
2 participants