Allow Dex auto scaling
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
d980d0fb28
commit
038d84d46b
3 changed files with 45 additions and 3 deletions
|
@ -67,6 +67,13 @@ Create argocd repo-server name and version as used by the chart label.
|
||||||
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.repoServer.name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.repoServer.name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create argocd dex-server name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "argo-cd.dex.fullname" -}}
|
||||||
|
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.dex.name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create the name of the controller service account to use
|
Create the name of the controller service account to use
|
||||||
*/}}
|
*/}}
|
||||||
|
|
28
charts/argo-cd/templates/dex/hpa.yaml
Normal file
28
charts/argo-cd/templates/dex/hpa.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{{- if and .Values.dex.enabled .Values.dex.autoscaling.enabled }}
|
||||||
|
apiVersion: autoscaling/v2beta1
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" (printf "%s-hpa" .Values.dex.name)) | nindent 4 }}
|
||||||
|
name: {{ template "argo-cd.dex.fullname" . }}-hpa
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ template "argo-cd.dex.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.dex.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.dex.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
{{- with .Values.dex.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
targetAverageUtilization: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.dex.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
targetAverageUtilization: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -220,6 +220,13 @@ dex:
|
||||||
|
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|
||||||
|
autoscaling:
|
||||||
|
enabled: false
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 5
|
||||||
|
targetCPUUtilizationPercentage: 50
|
||||||
|
targetMemoryUtilizationPercentage: 50
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
service:
|
service:
|
||||||
|
|
Loading…
Reference in a new issue