vpa.yaml 924 B

1234567891011121314151617181920212223242526
  1. {{- if .Values.server.verticalAutoscaler.enabled -}}
  2. {{- if .Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler" }}
  3. apiVersion: autoscaling.k8s.io/v1
  4. {{- else }}
  5. apiVersion: autoscaling.k8s.io/v1beta2
  6. {{- end }}
  7. kind: VerticalPodAutoscaler
  8. metadata:
  9. labels:
  10. {{- include "prometheus.server.labels" . | nindent 4 }}
  11. name: {{ template "prometheus.server.fullname" . }}-vpa
  12. {{ include "prometheus.namespace" . | indent 2 }}
  13. spec:
  14. targetRef:
  15. apiVersion: "apps/v1"
  16. {{- if .Values.server.statefulSet.enabled }}
  17. kind: StatefulSet
  18. {{- else }}
  19. kind: Deployment
  20. {{- end }}
  21. name: {{ template "prometheus.server.fullname" . }}
  22. updatePolicy:
  23. updateMode: {{ .Values.server.verticalAutoscaler.updateMode | default "Off" | quote }}
  24. resourcePolicy:
  25. containerPolicies: {{ .Values.server.verticalAutoscaler.containerPolicies | default list | toYaml | trim | nindent 4 }}
  26. {{- end -}}