Skip to content

Commit d513301

Browse files
authored
feat(vpa): add configuration for revisionHistoryLimit in helm chart (kubernetes#9307)
* fix(vpa): add configuration for revisionHistoryLimit in helm chart Signed-off-by: t3mi <t3mi@users.noreply.github.com> * fix: update docs Signed-off-by: t3mi <t3mi@users.noreply.github.com> --------- Signed-off-by: t3mi <t3mi@users.noreply.github.com>
1 parent 1b7ffd1 commit d513301

5 files changed

Lines changed: 15 additions & 0 deletions

File tree

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ helm upgrade <release-name> <chart> \
116116
| admissionController.registerWebhook | bool | `false` | Whether to register webhook via the application itself or via Helm. Set to false when using Helm-managed webhook. Security issue: granting delete on mutatingwebhookconfigurations is a potential security risk as it allows the admission controller to remove any webhook configurations. |
117117
| admissionController.replicas | int | `2` | |
118118
| admissionController.resources | object | `{}` | |
119+
| admissionController.revisionHistoryLimit | int | `10` | |
119120
| admissionController.service.annotations | object | `{}` | |
120121
| admissionController.service.name | string | `"vpa-webhook"` | |
121122
| admissionController.service.ports[0].port | int | `443` | |
@@ -178,6 +179,7 @@ helm upgrade <release-name> <chart> \
178179
| recommender.priorityClassName | string | `nil` | |
179180
| recommender.replicas | int | `2` | |
180181
| recommender.resources | object | `{}` | |
182+
| recommender.revisionHistoryLimit | int | `10` | |
181183
| recommender.serviceAccount.annotations | object | `{}` | |
182184
| recommender.serviceAccount.create | bool | `true` | |
183185
| recommender.serviceAccount.labels | object | `{}` | |
@@ -208,6 +210,7 @@ helm upgrade <release-name> <chart> \
208210
| updater.priorityClassName | string | `nil` | |
209211
| updater.replicas | int | `2` | |
210212
| updater.resources | object | `{}` | |
213+
| updater.revisionHistoryLimit | int | `10` | |
211214
| updater.serviceAccount.annotations | object | `{}` | |
212215
| updater.serviceAccount.create | bool | `true` | |
213216
| updater.serviceAccount.labels | object | `{}` | |

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/templates/admission-controller-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ metadata:
1515
{{- end }}
1616
spec:
1717
replicas: {{ .Values.admissionController.replicas }}
18+
revisionHistoryLimit: {{ .Values.admissionController.revisionHistoryLimit }}
1819
{{- with .Values.admissionController.updateStrategy }}
1920
strategy:
2021
{{- toYaml . | nindent 4 }}

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/templates/recommender-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ metadata:
1212
{{- end }}
1313
spec:
1414
replicas: {{ .Values.recommender.replicas }}
15+
revisionHistoryLimit: {{ .Values.recommender.revisionHistoryLimit }}
1516
{{- with .Values.recommender.updateStrategy }}
1617
strategy:
1718
{{- toYaml . | nindent 4 }}

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/templates/updater-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ metadata:
1212
{{- end }}
1313
spec:
1414
replicas: {{ .Values.updater.replicas }}
15+
revisionHistoryLimit: {{ .Values.updater.revisionHistoryLimit }}
1516
selector:
1617
matchLabels:
1718
{{- include "vertical-pod-autoscaler.updater.selectorLabels" . | nindent 6 }}

vertical-pod-autoscaler/charts/vertical-pod-autoscaler/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ admissionController:
5656
# Number of Admission Controller replicas to create.
5757
replicas: 2
5858

59+
# The number of old history revisions to retain to allow rollback.
60+
revisionHistoryLimit: 10
61+
5962
# Labels to add to the Admission Controller pod.
6063
podLabels: {}
6164

@@ -212,6 +215,9 @@ recommender:
212215
# Number of Recommender replicas to create.
213216
replicas: 2
214217

218+
# The number of old history revisions to retain to allow rollback.
219+
revisionHistoryLimit: 10
220+
215221
# Labels to add to the Recommender pod.
216222
podLabels: {}
217223

@@ -304,6 +310,9 @@ updater:
304310
# Number of Updater replicas to create.
305311
replicas: 2
306312

313+
# The number of old history revisions to retain to allow rollback.
314+
revisionHistoryLimit: 10
315+
307316
# Labels to add to the Updater pod.
308317
podLabels: {}
309318

0 commit comments

Comments
 (0)