freeleaps-ops/freeleaps/helm-pkg/centralStorage/templates/central-storage/vpa.yaml
2025-06-10 23:53:31 +08:00

32 lines
1.0 KiB
YAML

{{- if .Values.centralStorage.vpa }}
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ .Release.Name }}-central-storage-vpa
namespace: {{ .Release.Namespace }}
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: central-storage
resourcePolicy:
containerPolicies:
- containerName: '*'
{{- if .Values.centralStorage.vpa.minAllowed.enabled }}
minAllowed:
cpu: {{ .Values.centralStorage.vpa.minAllowed.cpu }}
memory: {{ .Values.centralStorage.vpa.minAllowed.memory }}
{{- end }}
{{- if .Values.centralStorage.vpa.maxAllowed.enabled }}
maxAllowed:
cpu: {{ .Values.centralStorage.vpa.maxAllowed.cpu }}
memory: {{ .Values.centralStorage.vpa.maxAllowed.memory }}
{{- end }}
{{- if .Values.centralStorage.vpa.controlledResources }}
controlledResources:
{{- range .Values.centralStorage.vpa.controlledResources }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}