netflux-kubernetes/deploy/dev/charts/prometheus/templates/pushgateway/vpa.yaml

21 lines
870 B
YAML

{{- if .Values.pushgateway.enabled -}}
{{- if .Values.pushgateway.verticalAutoscaler.enabled -}}
apiVersion: autoscaling.k8s.io/v1beta2
kind: VerticalPodAutoscaler
metadata:
labels:
{{- include "prometheus.pushgateway.labels" . | nindent 4 }}
name: {{ template "prometheus.pushgateway.fullname" . }}-vpa
{{ include "prometheus.namespace" . | indent 2 }}
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: {{ template "prometheus.pushgateway.fullname" . }}
updatePolicy:
updateMode: {{ .Values.pushgateway.verticalAutoscaler.updateMode | default "Off" | quote }}
resourcePolicy:
containerPolicies: {{ .Values.pushgateway.verticalAutoscaler.containerPolicies | default list | toYaml | trim | nindent 4 }}
{{- end -}} {{/* if .Values.pushgateway.verticalAutoscaler.enabled */}}
{{- end -}} {{/* .Values.pushgateway.enabled */}}