NDEV-17738 sort before chunking - 1.9 #57
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
Previously, large kyverno reports needed to be split into chunks, used to be refreshed frequently, generally once or so every minute.
Related issue
https://nirmata.atlassian.net/browse/NDEV-17738, and the original issue on Kyverno, kyverno#8520 (that has reproduce steps)
Milestone of this PR
1.95-n4k-nirmata.3
What type of PR is this
/kind bug
Proposed Changes
Earlier, we were sorting report results before creating the policyreport. This change sorts the results before chunking, so that we have a predictable sort order,
Proof Manifests
Tested this by first reproducing this defect on a kwok cluster as described in the original Kyverno ticket. And after fix, ensured that the
kubectl -n ns-1 get polr -w
does not continuously update.Checklist
Further Comments