2020-02-16 16:14:39 -08:00
|
|
|
{{- if .Values.server.autoscaling.enabled }}
|
2023-08-28 10:12:29 +02:00
|
|
|
apiVersion: autoscaling/v2
|
2020-02-16 16:14:39 -08:00
|
|
|
kind: HorizontalPodAutoscaler
|
|
|
|
|
metadata:
|
2023-08-28 10:12:29 +02:00
|
|
|
name: {{ include "argo-cd.server.fullname" . }}
|
2024-05-14 17:17:31 +02:00
|
|
|
namespace: {{ include "argo-cd.namespace" . }}
|
2023-08-28 10:12:29 +02:00
|
|
|
labels:
|
|
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
2020-02-16 16:14:39 -08:00
|
|
|
spec:
|
|
|
|
|
scaleTargetRef:
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
2023-08-28 10:12:29 +02:00
|
|
|
name: {{ include "argo-cd.server.fullname" . }}
|
2020-02-16 16:14:39 -08:00
|
|
|
minReplicas: {{ .Values.server.autoscaling.minReplicas }}
|
|
|
|
|
maxReplicas: {{ .Values.server.autoscaling.maxReplicas }}
|
|
|
|
|
metrics:
|
2023-08-28 10:12:29 +02:00
|
|
|
{{- with .Values.server.autoscaling.metrics }}
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
2023-07-17 08:20:47 -04:00
|
|
|
{{- else }}
|
2023-08-28 10:12:29 +02:00
|
|
|
{{- with .Values.server.autoscaling.targetMemoryUtilizationPercentage }}
|
2020-02-16 16:14:39 -08:00
|
|
|
- type: Resource
|
|
|
|
|
resource:
|
2020-02-22 11:55:40 +09:00
|
|
|
name: memory
|
2022-07-14 15:02:52 +02:00
|
|
|
target:
|
|
|
|
|
type: Utilization
|
2023-08-28 10:12:29 +02:00
|
|
|
averageUtilization: {{ . }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.server.autoscaling.targetCPUUtilizationPercentage }}
|
2020-02-16 16:14:39 -08:00
|
|
|
- type: Resource
|
|
|
|
|
resource:
|
2020-02-22 11:55:40 +09:00
|
|
|
name: cpu
|
2022-07-14 15:02:52 +02:00
|
|
|
target:
|
|
|
|
|
type: Utilization
|
2023-08-28 10:12:29 +02:00
|
|
|
averageUtilization: {{ . }}
|
|
|
|
|
{{- end }}
|
2022-08-25 12:10:50 +05:30
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.server.autoscaling.behavior }}
|
|
|
|
|
behavior:
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
2020-02-16 16:14:39 -08:00
|
|
|
{{- end }}
|