helm-charts/nextcloud/templates/hpa.yaml

20 lines
688 B
YAML
Raw Normal View History

2021-01-17 01:09:41 +00:00
{{- if .Values.hpa.enabled -}}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "nextcloud.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
helm.sh/chart: {{ include "nextcloud.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/component: app
spec:
scaleTargetRef:
kind: Deployment
apiVersion: apps/v1
name: {{ template "nextcloud.fullname" . }}
minReplicas: {{ .Values.hpa.minPods }}
maxReplicas: {{ .Values.hpa.maxPods }}
targetCPUUtilizationPercentage: {{ .Values.hpa.cputhreshold }}
{{- end }}