mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 11:18:47 +00:00
feat: add aggregation workers flag (#10331)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
12f70aa0a0
commit
e70808ada4
1 changed files with 7 additions and 1 deletions
|
@ -54,6 +54,7 @@ func createReportControllers(
|
|||
aggregateReports bool,
|
||||
policyReports bool,
|
||||
validatingAdmissionPolicyReports bool,
|
||||
aggregationWorkers int,
|
||||
backgroundScanWorkers int,
|
||||
client dclient.Interface,
|
||||
kyvernoClient versioned.Interface,
|
||||
|
@ -102,7 +103,7 @@ func createReportControllers(
|
|||
kyvernoV1.ClusterPolicies(),
|
||||
vapInformer,
|
||||
),
|
||||
aggregatereportcontroller.Workers,
|
||||
aggregationWorkers,
|
||||
))
|
||||
}
|
||||
if backgroundScan {
|
||||
|
@ -148,6 +149,7 @@ func createrLeaderControllers(
|
|||
aggregateReports bool,
|
||||
policyReports bool,
|
||||
validatingAdmissionPolicyReports bool,
|
||||
aggregationWorkers int,
|
||||
backgroundScanWorkers int,
|
||||
kubeInformer kubeinformers.SharedInformerFactory,
|
||||
kyvernoInformer kyvernoinformer.SharedInformerFactory,
|
||||
|
@ -166,6 +168,7 @@ func createrLeaderControllers(
|
|||
aggregateReports,
|
||||
policyReports,
|
||||
validatingAdmissionPolicyReports,
|
||||
aggregationWorkers,
|
||||
backgroundScanWorkers,
|
||||
dynamicClient,
|
||||
kyvernoClient,
|
||||
|
@ -190,6 +193,7 @@ func main() {
|
|||
reportsChunkSize int
|
||||
backgroundScanWorkers int
|
||||
backgroundScanInterval time.Duration
|
||||
aggregationWorkers int
|
||||
maxQueuedEvents int
|
||||
omitEvents string
|
||||
skipResourceFilters bool
|
||||
|
@ -202,6 +206,7 @@ func main() {
|
|||
flagset.BoolVar(&policyReports, "policyReports", true, "Enable or disable policy reports.")
|
||||
flagset.BoolVar(&validatingAdmissionPolicyReports, "validatingAdmissionPolicyReports", false, "Enable or disable validating admission policy reports.")
|
||||
flagset.IntVar(&reportsChunkSize, "reportsChunkSize", 0, "Max number of results in generated reports, reports will be split accordingly if there are more results to be stored.")
|
||||
flagset.IntVar(&aggregationWorkers, "aggregationWorkers", aggregatereportcontroller.Workers, "Configure the number of ephemeral reports aggregation workers.")
|
||||
flagset.IntVar(&backgroundScanWorkers, "backgroundScanWorkers", backgroundscancontroller.Workers, "Configure the number of background scan workers.")
|
||||
flagset.DurationVar(&backgroundScanInterval, "backgroundScanInterval", time.Hour, "Configure background scan interval.")
|
||||
flagset.IntVar(&maxQueuedEvents, "maxQueuedEvents", 1000, "Maximum events to be queued.")
|
||||
|
@ -333,6 +338,7 @@ func main() {
|
|||
aggregateReports,
|
||||
policyReports,
|
||||
validatingAdmissionPolicyReports,
|
||||
aggregationWorkers,
|
||||
backgroundScanWorkers,
|
||||
kubeInformer,
|
||||
kyvernoInformer,
|
||||
|
|
Loading…
Add table
Reference in a new issue