Skip to content

Commit

Permalink
feat: make reports breaker threshold configurable (kyverno#10596)
Browse files Browse the repository at this point in the history
* feat: make reports breaker threshold configurable

Signed-off-by: Charles-Edouard Brétéché <[email protected]>

* lower default threshold

Signed-off-by: Charles-Edouard Brétéché <[email protected]>

* release notes

Signed-off-by: Charles-Edouard Brétéché <[email protected]>

---------

Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Jul 3, 2024
1 parent c51bf97 commit fed71ff
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions charts/kyverno/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ annotations:
artifacthub.io/changes: |
- kind: added
description: Add a key to preserve configmap settings during upgrade
- kind: added
description: Make admission reports breaker threshold configurable
dependencies:
- name: grafana
version: v0.0.0
Expand Down
3 changes: 2 additions & 1 deletion charts/kyverno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ The chart values are organised per component.

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| admissionController.featuresOverride | object | `{}` | Overrides features defined at the root level |
| admissionController.featuresOverride | object | `{"admissionReports":{"backPressureThreshold":1000}}` | Overrides features defined at the root level |
| admissionController.featuresOverride.admissionReports.backPressureThreshold | int | `1000` | Max number of admission reports allowed in flight until the admission controller stops creating new ones |
| admissionController.rbac.create | bool | `true` | Create RBAC resources |
| admissionController.rbac.serviceAccount.name | string | `nil` | The ServiceAccount name |
| admissionController.rbac.serviceAccount.annotations | object | `{}` | Annotations for the ServiceAccount |
Expand Down
3 changes: 3 additions & 0 deletions charts/kyverno/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{{- $flags := list -}}
{{- with .admissionReports -}}
{{- $flags = append $flags (print "--admissionReports=" .enabled) -}}
{{- with .backPressureThreshold -}}
{{- $flags = append $flags (print "--maxAdmissionReports=" .) -}}
{{- end -}}
{{- end -}}
{{- with .aggregateReports -}}
{{- $flags = append $flags (print "--aggregateReports=" .enabled) -}}
Expand Down
5 changes: 4 additions & 1 deletion charts/kyverno/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,10 @@ cleanupJobs:
admissionController:

# -- Overrides features defined at the root level
featuresOverride: {}
featuresOverride:
admissionReports:
# -- Max number of admission reports allowed in flight until the admission controller stops creating new ones
backPressureThreshold: 1000

rbac:
# -- Create RBAC resources
Expand Down
1 change: 1 addition & 0 deletions config/install-latest-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44876,6 +44876,7 @@ spec:
- --otelConfig=prometheus
- --metricsPort=8000
- --admissionReports=true
- --maxAdmissionReports=1000
- --autoUpdateWebhooks=true
- --enableConfigMapCaching=true
- --enableDeferredLoading=true
Expand Down

0 comments on commit fed71ff

Please sign in to comment.