From f8f4f6bef05d97d5fc2a3b3e139fb4b0c4ed70a6 Mon Sep 17 00:00:00 2001 From: Thomas Colomb Date: Wed, 8 Mar 2023 08:17:05 +0100 Subject: [PATCH] fix: define memory target before cpu in hpa for kratos and hydra to avoid diff in argocd (#576) --- helm/charts/hydra/templates/hpa.yaml | 8 ++++---- helm/charts/kratos/templates/hpa.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helm/charts/hydra/templates/hpa.yaml b/helm/charts/hydra/templates/hpa.yaml index 7eae0f6590..1d4ed92a1d 100644 --- a/helm/charts/hydra/templates/hpa.yaml +++ b/helm/charts/hydra/templates/hpa.yaml @@ -16,17 +16,17 @@ spec: minReplicas: {{ .Values.deployment.autoscaling.minReplicas }} maxReplicas: {{ .Values.deployment.autoscaling.maxReplicas }} metrics: - {{- with .Values.deployment.autoscaling.targetCPU}} + {{- with .Values.deployment.autoscaling.targetMemory }} - type: Resource resource: - name: cpu + name: memory target: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.deployment.autoscaling.targetMemory }} + {{- with .Values.deployment.autoscaling.targetCPU}} - type: Resource resource: - name: memory + name: cpu target: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/helm/charts/kratos/templates/hpa.yaml b/helm/charts/kratos/templates/hpa.yaml index a23182bb83..699b8d6466 100644 --- a/helm/charts/kratos/templates/hpa.yaml +++ b/helm/charts/kratos/templates/hpa.yaml @@ -13,17 +13,17 @@ spec: minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: - {{- with .Values.autoscaling.targetCPU}} + {{- with .Values.autoscaling.targetMemory }} - type: Resource resource: - name: cpu + name: memory target: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.autoscaling.targetMemory }} + {{- with .Values.autoscaling.targetCPU}} - type: Resource resource: - name: memory + name: cpu target: {{- toYaml . | nindent 8 }} {{- end }}