Skip to content

Commit

Permalink
feat: remove reports chunking (kyverno#10597)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Jul 4, 2024
1 parent d5d9d9c commit 56e58d6
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.13.0

### Note

- Removed deprecated flag `reportsChunkSize`.

## v1.11.0

## v1.11.0-rc.1
Expand Down
2 changes: 2 additions & 0 deletions charts/kyverno/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ annotations:
description: Add a key to preserve configmap settings during upgrade
- kind: added
description: Make admission reports breaker threshold configurable
- kind: removed
description: Deprecated configuration `features.reports.chunkSize` was removed
dependencies:
- name: grafana
version: v0.0.0
Expand Down
1 change: 0 additions & 1 deletion charts/kyverno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ The chart values are organised per component.
| features.protectManagedResources.enabled | bool | `false` | Enables the feature |
| features.registryClient.allowInsecure | bool | `false` | Allow insecure registry |
| features.registryClient.credentialHelpers | list | `["default","google","amazon","azure","github"]` | Enable registry client helpers |
| features.reports.chunkSize | int | `0` | Reports chunk size |
| features.ttlController.reconciliationInterval | string | `"1m"` | Reconciliation interval for the label based cleanup manager |
| features.tuf.enabled | bool | `false` | Enables the feature |
| features.tuf.root | string | `nil` | Tuf root |
Expand Down
3 changes: 0 additions & 3 deletions charts/kyverno/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
{{- with .protectManagedResources -}}
{{- $flags = append $flags (print "--protectManagedResources=" .enabled) -}}
{{- end -}}
{{- with .reports -}}
{{- $flags = append $flags (print "--reportsChunkSize=" .chunkSize) -}}
{{- end -}}
{{- with .registryClient -}}
{{- $flags = append $flags (print "--allowInsecureRegistry=" .allowInsecure) -}}
{{- $flags = append $flags (print "--registryCredentialHelpers=" (join "," .credentialHelpers)) -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ spec:
"logging"
"omitEvents"
"policyExceptions"
"reports"
"registryClient"
"tuf"
) | nindent 12 }}
Expand Down
3 changes: 0 additions & 3 deletions charts/kyverno/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,6 @@ features:
- amazon
- azure
- github
reports:
# -- Reports chunk size
chunkSize: 0
ttlController:
# -- Reconciliation interval for the label based cleanup manager
reconciliationInterval: 1m
Expand Down
7 changes: 0 additions & 7 deletions cmd/reports-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ func main() {
aggregateReports bool
policyReports bool
validatingAdmissionPolicyReports bool
reportsChunkSize int
backgroundScanWorkers int
backgroundScanInterval time.Duration
aggregationWorkers int
Expand All @@ -205,7 +204,6 @@ func main() {
flagset.BoolVar(&aggregateReports, "aggregateReports", true, "Enable or disable aggregated policy reports.")
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.")
Expand Down Expand Up @@ -245,11 +243,6 @@ func main() {
// setup
ctx, setup, sdown := internal.Setup(appConfig, "kyverno-reports-controller", skipResourceFilters)
defer sdown()
// show warnings
if reportsChunkSize != 0 {
logger := setup.Logger.WithName("wanings")
logger.Info("Warning: reportsChunkSize is deprecated and will be removed in 1.13.")
}
// THIS IS AN UGLY FIX
// ELSE KYAML IS NOT THREAD SAFE
kyamlopenapi.Schema()
Expand Down
1 change: 0 additions & 1 deletion config/install-latest-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45289,7 +45289,6 @@ spec:
- --v=2
- --omitEvents=PolicyApplied,PolicySkipped
- --enablePolicyException=true
- --reportsChunkSize=0
- --allowInsecureRegistry=false
- --registryCredentialHelpers=default,google,amazon,azure,github

Expand Down

0 comments on commit 56e58d6

Please sign in to comment.