1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

feat: add flag to configure the number of background scan workers ()

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-10-20 23:02:38 +02:00 committed by GitHub
parent 2078f0dfd2
commit 0d50b70134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
## v1.8.1-rc3
### Note
- A new flag `backgroundScanWorkers` to configure the number of background scan workers (default value is `2`).
## v1.8.0-rc3
### Note

View file

@ -93,6 +93,7 @@ var (
backgroundScan bool
admissionReports bool
reportsChunkSize int
backgroundScanWorkers int
logFormat string
// DEPRECATED: remove in 1.9
splitPolicyReport bool
@ -126,6 +127,7 @@ func parseFlags() error {
flag.BoolVar(&backgroundScan, "backgroundScan", true, "Enable or disable backgound scan.")
flag.BoolVar(&admissionReports, "admissionReports", true, "Enable or disable admission reports.")
flag.IntVar(&reportsChunkSize, "reportsChunkSize", 1000, "Max number of results in generated reports, reports will be split accordingly if there are more results to be stored.")
flag.IntVar(&backgroundScanWorkers, "backgroundScanWorkers", backgroundscancontroller.Workers, "Configure the number of background scan workers.")
// DEPRECATED: remove in 1.9
flag.BoolVar(&splitPolicyReport, "splitPolicyReport", false, "This is deprecated, please don't use it, will be removed in v1.9.")
if err := flag.Set("v", "2"); err != nil {
@ -410,7 +412,7 @@ func createReportControllers(
kubeInformer.Core().V1().Namespaces(),
resourceReportController,
),
backgroundscancontroller.Workers,
backgroundScanWorkers,
))
}
}