-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Vertical Pod Autoscaler support (#183)
* feat: add Vertical Pod Autoscaler * docs: add VPA section * feat: Add tests for VPA * feat: add support for k8s < 1.25 for VPA * fix(vpa): fix typos * fix: typos
- Loading branch information
Showing
5 changed files
with
403 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{- if .Values.verticalPodAutoscaler.enabled }} | ||
apiVersion: {{ include "gruntwork.verticalPodAutoscaler.apiVersion" . }} | ||
kind: VerticalPodAutoscaler | ||
metadata: | ||
name: {{ include "k8s-service.fullname" . }} | ||
namespace: {{ $.Release.Namespace }} | ||
spec: | ||
targetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "k8s-service.fullname" . }} | ||
updatePolicy: | ||
updateMode: {{ .Values.verticalPodAutoscaler.updateMode | quote }} | ||
minReplicas: {{ .Values.verticalPodAutoscaler.minReplicas }} | ||
resourcePolicy: | ||
containerPolicies: | ||
- containerName: {{ include "k8s-service.fullname" . }} | ||
{{- if .Values.verticalPodAutoscaler.mainContainerResourcePolicy.minAllowed }} | ||
minAllowed: | ||
{{- toYaml .Values.verticalPodAutoscaler.mainContainerResourcePolicy.minAllowed | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- if .Values.verticalPodAutoscaler.mainContainerResourcePolicy.maxAllowed }} | ||
maxAllowed: | ||
{{- toYaml .Values.verticalPodAutoscaler.mainContainerResourcePolicy.maxAllowed | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- if .Values.verticalPodAutoscaler.mainContainerResourcePolicy.controlledResources }} | ||
controlledResources: | ||
{{- toYaml .Values.verticalPodAutoscaler.mainContainerResourcePolicy.controlledResources | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- if .Values.verticalPodAutoscaler.mainContainerResourcePolicy.controlledValues }} | ||
controlledValues: {{ .Values.verticalPodAutoscaler.mainContainerResourcePolicy.controlledValues }} | ||
{{- end }} | ||
|
||
{{- if .Values.verticalPodAutoscaler.extraResourcePolicy }} | ||
{{- toYaml .Values.verticalPodAutoscaler.extraResourcePolicy | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.