This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2022-11-10 14:24:39 -08:00
|
|
|
{{- if .Values.autoscaling.enabled -}}
|
2020-06-29 04:58:48 -07:00
|
|
|
apiVersion: autoscaling/v2beta1
|
|
|
|
kind: HorizontalPodAutoscaler
|
|
|
|
metadata:
|
|
|
|
name: {{ include "mastodon.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "mastodon.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
scaleTargetRef:
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
name: {{ include "mastodon.fullname" . }}
|
|
|
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
|
|
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
|
|
|
metrics:
|
2022-11-10 14:24:39 -08:00
|
|
|
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
2020-06-29 04:58:48 -07:00
|
|
|
- type: Resource
|
|
|
|
resource:
|
|
|
|
name: cpu
|
|
|
|
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
2022-11-10 14:24:39 -08:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
2020-06-29 04:58:48 -07:00
|
|
|
- type: Resource
|
|
|
|
resource:
|
|
|
|
name: memory
|
|
|
|
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
2022-11-10 14:24:39 -08:00
|
|
|
{{- end }}
|
2020-06-29 04:58:48 -07:00
|
|
|
{{- end }}
|