-
Notifications
You must be signed in to change notification settings - Fork 565
Expand file tree
/
Copy pathvertical-pod-autoscaler.yaml
More file actions
34 lines (34 loc) · 1.09 KB
/
vertical-pod-autoscaler.yaml
File metadata and controls
34 lines (34 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{{ $VerticalPodAutoScalingEnabled := include "VerticalPodAutoScalingEnabled" . }}
{{- if eq "true" $VerticalPodAutoScalingEnabled -}}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
{{- if .Values.verticalPodScaling.name }}
name: {{ .Values.verticalPodScaling.name }}
{{- else }}
name: {{ template ".Chart.Name .fullname" . }}-vpa
{{- end }}
labels:
kind: Prometheus
app: {{ template ".Chart.Name .name" . }}
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}
chart: {{ template ".Chart.Name .chart" . }}
release: {{ .Values.prometheus.release }}
{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 4 }}
{{- end }}
spec:
{{- if .Values.verticalPodScaling.resourcePolicy }}
resourcePolicy:
{{ toYaml .Values.verticalPodScaling.resourcePolicy}}
{{- end }}
{{- if .Values.verticalPodScaling.updatePolicy }}
updatePolicy:
{{ toYaml .Values.verticalPodScaling.updatePolicy}}
{{- end }}
targetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include ".Chart.Name .fullname" $ }}
{{- end }}