feat: Add HPA for ArgoCD server and repoServer components (#240)
* argo-cd: add optional hpa, cleanup whitespace
This commit is contained in:
parent
fdb6093011
commit
d9d7862864
8 changed files with 98 additions and 4 deletions
33
charts/argo-cd/templates/argocd-server/hpa.yaml
Normal file
33
charts/argo-cd/templates/argocd-server/hpa.yaml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{{- if .Values.server.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.server.name }}-hpa
|
||||
helm.sh/chart: {{ include "argo-cd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/part-of: argocd
|
||||
app.kubernetes.io/component: {{ .Values.server.name }}
|
||||
name: {{ template "argo-cd.server.fullname" . }}-hpa
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ template "argo-cd.server.fullname" . }}
|
||||
minReplicas: {{ .Values.server.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.server.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- with .Values.server.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.server.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue