-
Notifications
You must be signed in to change notification settings - Fork 917
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: avoid creating duplicate urs for background policies #10431
fix: avoid creating duplicate urs for background policies #10431
Conversation
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
/cherry-pick release-1.12 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10431 +/- ##
==========================================
- Coverage 10.03% 10.02% -0.01%
==========================================
Files 1041 1041
Lines 93857 93864 +7
==========================================
Hits 9414 9414
- Misses 83407 83414 +7
Partials 1036 1036 ☔ View full report in Codecov by Sentry. |
Signed-off-by: ShutingZhao <[email protected]>
Signed-off-by: ShutingZhao <[email protected]>
Base branch was modified
* feat: add generator abstraction Signed-off-by: ShutingZhao <[email protected]> * feat: replace urgenerator Signed-off-by: ShutingZhao <[email protected]> * fix: ko build Signed-off-by: ShutingZhao <[email protected]> * feat: load threshold from kyverno configmap Signed-off-by: ShutingZhao <[email protected]> * feat: add metadata client to get ur count Signed-off-by: ShutingZhao <[email protected]> * feat: add helm option to preserve configmap settings during upgrade Signed-off-by: ShutingZhao <[email protected]> * feat: add helm option to preserve configmap settings during upgrade 2 Signed-off-by: ShutingZhao <[email protected]> * chore: rename imports Signed-off-by: ShutingZhao <[email protected]> * chore: update codegen manifests Signed-off-by: ShutingZhao <[email protected]> * fix: handle nil value Signed-off-by: ShutingZhao <[email protected]> * fix: linter issue Signed-off-by: ShutingZhao <[email protected]> * chore: update threshold to 1000 Signed-off-by: ShutingZhao <[email protected]> * fix: avoid duplicate URs creation Signed-off-by: ShutingZhao <[email protected]> * fix: revert false changes Signed-off-by: ShutingZhao <[email protected]> * fix: simplify background applications Signed-off-by: ShutingZhao <[email protected]> --------- Signed-off-by: ShutingZhao <[email protected]>
…10444) * feat: add generator abstraction * feat: replace urgenerator * fix: ko build * feat: load threshold from kyverno configmap * feat: add metadata client to get ur count * feat: add helm option to preserve configmap settings during upgrade * feat: add helm option to preserve configmap settings during upgrade 2 * chore: rename imports * chore: update codegen manifests * fix: handle nil value * fix: linter issue * chore: update threshold to 1000 * fix: avoid duplicate URs creation * fix: revert false changes * fix: simplify background applications --------- Signed-off-by: ShutingZhao <[email protected]> Co-authored-by: shuting <[email protected]>
) * feat: add generator abstraction Signed-off-by: ShutingZhao <[email protected]> * feat: replace urgenerator Signed-off-by: ShutingZhao <[email protected]> * fix: ko build Signed-off-by: ShutingZhao <[email protected]> * feat: load threshold from kyverno configmap Signed-off-by: ShutingZhao <[email protected]> * feat: add metadata client to get ur count Signed-off-by: ShutingZhao <[email protected]> * feat: add helm option to preserve configmap settings during upgrade Signed-off-by: ShutingZhao <[email protected]> * feat: add helm option to preserve configmap settings during upgrade 2 Signed-off-by: ShutingZhao <[email protected]> * chore: rename imports Signed-off-by: ShutingZhao <[email protected]> * chore: update codegen manifests Signed-off-by: ShutingZhao <[email protected]> * fix: handle nil value Signed-off-by: ShutingZhao <[email protected]> * fix: linter issue Signed-off-by: ShutingZhao <[email protected]> * chore: update threshold to 1000 Signed-off-by: ShutingZhao <[email protected]> * fix: avoid duplicate URs creation Signed-off-by: ShutingZhao <[email protected]> * fix: revert false changes Signed-off-by: ShutingZhao <[email protected]> * fix: simplify background applications Signed-off-by: ShutingZhao <[email protected]> --------- Signed-off-by: ShutingZhao <[email protected]>
Explanation
This PR fixes duplicate urs creation for the same rule. The issue happens when a background policy has
generateExisting
ormutateExistingOnPolicyUpdate
enabled.When such a policy is created:
27 updaterequests are created for 3 matching triggers, 3 rules
9 updaterequests are created for 3 matching triggers, 3 rules
policy:
Related issue
#9633
Milestone of this PR
Documentation (required for features)
My PR contains new or altered behavior to Kyverno.
What type of PR is this
Proposed Changes
Proof Manifests
Checklist
Further Comments