Skip to content

Commit c2e0c20

Browse files
authored
Merge pull request kubernetes#9316 from dippynark/handle-nil-replicas
feat(vpa): Handle null Deployment replicas fields in VerticalPodAutoscaler Helm chart
2 parents 76c23d6 + 09f0db2 commit c2e0c20

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ metadata:
1414
{{- toYaml . | nindent 4 }}
1515
{{- end }}
1616
spec:
17-
replicas: {{ .Values.admissionController.replicas }}
17+
{{- with .Values.admissionController.replicas }}
18+
replicas: {{ . }}
19+
{{- end }}
1820
revisionHistoryLimit: {{ .Values.admissionController.revisionHistoryLimit }}
1921
{{- with .Values.admissionController.updateStrategy }}
2022
strategy:

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ metadata:
1111
{{- toYaml . | nindent 4 }}
1212
{{- end }}
1313
spec:
14-
replicas: {{ .Values.recommender.replicas }}
14+
{{- with .Values.recommender.replicas }}
15+
replicas: {{ . }}
16+
{{- end }}
1517
revisionHistoryLimit: {{ .Values.recommender.revisionHistoryLimit }}
1618
{{- with .Values.recommender.updateStrategy }}
1719
strategy:

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ metadata:
1111
{{- toYaml . | nindent 4 }}
1212
{{- end }}
1313
spec:
14-
replicas: {{ .Values.updater.replicas }}
14+
{{- with .Values.updater.replicas }}
15+
replicas: {{ . }}
16+
{{- end }}
1517
revisionHistoryLimit: {{ .Values.updater.revisionHistoryLimit }}
1618
selector:
1719
matchLabels:

0 commit comments

Comments
 (0)