1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 18:15:48 +00:00

fix: split policy report flag (#4576)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-09-10 17:29:48 +02:00 committed by GitHub
parent f7853bb699
commit 6a0fff7c9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,9 +37,6 @@ type changeRequestCreator struct {
mutex sync.RWMutex
queue []string
// splitPolicyReport enable/disable the PolicyReport split-up per policy feature
splitPolicyReport bool
tickerInterval time.Duration
log logr.Logger
@ -126,7 +123,7 @@ func (c *changeRequestCreator) run(stopChan <-chan struct{}) {
case <-ticker.C:
var requests []*unstructured.Unstructured
var size int
if c.splitPolicyReport {
if toggle.SplitPolicyReport.Enabled() {
requests, size = c.mergeRequestsPerPolicy()
} else {
requests, size = c.mergeRequests()