Skip to content

Commit

Permalink
fix: Add chart parameters for setting revisionHistoryLimit
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Dainty <[email protected]>
  • Loading branch information
bodgit committed Nov 16, 2023
1 parent 871d8ed commit fe00185
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 1 deletion.
2 changes: 2 additions & 0 deletions charts/kyverno/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ annotations:
url: https://kyverno.io/docs
# valid kinds are: added, changed, deprecated, removed, fixed and security
artifacthub.io/changes: |
- kind: added
description: allow overriding revisionHistoryLimit
- kind: added
description: support for GrafanaDashboard custom resource
- kind: changed
Expand Down
4 changes: 4 additions & 0 deletions charts/kyverno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ The chart values are organised per component.
| admissionController.rbac.clusterRole.extraResources | list | `[]` | Extra resource permissions to add in the cluster role |
| admissionController.createSelfSignedCert | bool | `false` | Create self-signed certificates at deployment time. The certificates won't be automatically renewed if this is set to `true`. |
| admissionController.replicas | int | `nil` | Desired number of pods |
| admissionController.revisionHistoryLimit | int | `10` | The number of revisions to keep |
| admissionController.podLabels | object | `{}` | Additional labels to add to each pod |
| admissionController.podAnnotations | object | `{}` | Additional annotations to add to each pod |
| admissionController.updateStrategy | object | See [values.yaml](values.yaml) | Deployment update strategy. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |
Expand Down Expand Up @@ -425,6 +426,7 @@ The chart values are organised per component.
| backgroundController.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| backgroundController.imagePullSecrets | list | `[]` | Image pull secrets |
| backgroundController.replicas | int | `nil` | Desired number of pods |
| backgroundController.revisionHistoryLimit | int | `10` | The number of revisions to keep |
| backgroundController.podLabels | object | `{}` | Additional labels to add to each pod |
| backgroundController.podAnnotations | object | `{}` | Additional annotations to add to each pod |
| backgroundController.updateStrategy | object | See [values.yaml](values.yaml) | Deployment update strategy. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |
Expand Down Expand Up @@ -490,6 +492,7 @@ The chart values are organised per component.
| cleanupController.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| cleanupController.imagePullSecrets | list | `[]` | Image pull secrets |
| cleanupController.replicas | int | `nil` | Desired number of pods |
| cleanupController.revisionHistoryLimit | int | `10` | The number of revisions to keep |
| cleanupController.podLabels | object | `{}` | Additional labels to add to each pod |
| cleanupController.podAnnotations | object | `{}` | Additional annotations to add to each pod |
| cleanupController.updateStrategy | object | See [values.yaml](values.yaml) | Deployment update strategy. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |
Expand Down Expand Up @@ -561,6 +564,7 @@ The chart values are organised per component.
| reportsController.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| reportsController.imagePullSecrets | list | `[]` | Image pull secrets |
| reportsController.replicas | int | `nil` | Desired number of pods |
| reportsController.revisionHistoryLimit | int | `10` | The number of revisions to keep |
| reportsController.podLabels | object | `{}` | Additional labels to add to each pod |
| reportsController.podAnnotations | object | `{}` | Additional annotations to add to each pod |
| reportsController.updateStrategy | object | See [values.yaml](values.yaml) | Deployment update strategy. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
{{- include "kyverno.admission-controller.labels" . | nindent 4 }}
spec:
replicas: {{ template "kyverno.deployment.replicas" .Values.admissionController.replicas }}
revisionHistoryLimit: {{ .Values.admissionController.revisionHistoryLimit }}
{{- with .Values.admissionController.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
{{- include "kyverno.background-controller.labels" . | nindent 4 }}
spec:
replicas: {{ template "kyverno.deployment.replicas" .Values.backgroundController.replicas }}
revisionHistoryLimit: {{ .Values.backgroundController.revisionHistoryLimit }}
{{- with .Values.backgroundController.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
Expand Down
3 changes: 2 additions & 1 deletion charts/kyverno/templates/cleanup-controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
{{- include "kyverno.cleanup-controller.labels" . | nindent 4 }}
spec:
replicas: {{ template "kyverno.deployment.replicas" .Values.cleanupController.replicas }}
revisionHistoryLimit: {{ .Values.cleanupController.revisionHistoryLimit }}
{{- with .Values.cleanupController.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -162,4 +163,4 @@ spec:
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
{{- include "kyverno.reports-controller.labels" . | nindent 4 }}
spec:
replicas: {{ template "kyverno.deployment.replicas" .Values.reportsController.replicas }}
revisionHistoryLimit: {{ .Values.reportsController.revisionHistoryLimit }}
{{- with .Values.reportsController.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
Expand Down
12 changes: 12 additions & 0 deletions charts/kyverno/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,9 @@ admissionController:
# -- (int) Desired number of pods
replicas: ~

# -- The number of revisions to keep
revisionHistoryLimit: 10

# -- Additional labels to add to each pod
podLabels: {}
# example.com/label: foo
Expand Down Expand Up @@ -1084,6 +1087,9 @@ backgroundController:
# -- (int) Desired number of pods
replicas: ~

# -- The number of revisions to keep
revisionHistoryLimit: 10

# -- Additional labels to add to each pod
podLabels: {}
# example.com/label: foo
Expand Down Expand Up @@ -1309,6 +1315,9 @@ cleanupController:
# -- (int) Desired number of pods
replicas: ~

# -- The number of revisions to keep
revisionHistoryLimit: 10

# -- Additional labels to add to each pod
podLabels: {}
# example.com/label: foo
Expand Down Expand Up @@ -1580,6 +1589,9 @@ reportsController:
# -- (int) Desired number of pods
replicas: ~

# -- The number of revisions to keep
revisionHistoryLimit: 10

# -- Additional labels to add to each pod
podLabels: {}
# example.com/label: foo
Expand Down
4 changes: 4 additions & 0 deletions config/install-latest-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45440,6 +45440,7 @@ metadata:
app.kubernetes.io/version: latest
spec:
replicas:
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 1
Expand Down Expand Up @@ -45631,6 +45632,7 @@ metadata:
app.kubernetes.io/version: latest
spec:
replicas:
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 1
Expand Down Expand Up @@ -45729,6 +45731,7 @@ metadata:
app.kubernetes.io/version: latest
spec:
replicas:
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 1
Expand Down Expand Up @@ -45860,6 +45863,7 @@ metadata:
app.kubernetes.io/version: latest
spec:
replicas:
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 1
Expand Down

0 comments on commit fe00185

Please sign in to comment.