From fb9367084db5e085602a46b1376a8a8e48947ec2 Mon Sep 17 00:00:00 2001 From: Silvan Loser <33911078+losil@users.noreply.github.com> Date: Thu, 27 Jun 2024 10:59:23 +0200 Subject: [PATCH 1/2] fix: Reorder metrics list in HPA this fixed reconciliation loops with Argo CD because HPA controller reorders this list Signed-off-by: Silvan Loser <33911078+losil@users.noreply.github.com> --- helm/oauth2-proxy/Chart.yaml | 6 +++--- helm/oauth2-proxy/templates/hpa.yaml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index f9ab497..59517ec 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.7.6 +version: 7.7.7 apiVersion: v2 appVersion: 7.6.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -35,7 +35,7 @@ kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - kind: fixed - description: Updated the Redis chart to the latest version + description: Reorder metrics list in HPA to avoid reconciliation loops with Argo CD links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/218 + url: https://github.com/oauth2-proxy/manifests/pull/219 diff --git a/helm/oauth2-proxy/templates/hpa.yaml b/helm/oauth2-proxy/templates/hpa.yaml index d4fb8e4..841964d 100644 --- a/helm/oauth2-proxy/templates/hpa.yaml +++ b/helm/oauth2-proxy/templates/hpa.yaml @@ -19,20 +19,20 @@ spec: minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: - name: cpu + name: memory target: type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: - name: memory + name: cpu target: type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- end }} From 2b6b0f55c406f80e474dfbf13cf26f60ecab8d4f Mon Sep 17 00:00:00 2001 From: Silvan Loser <33911078+losil@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:04:45 +0200 Subject: [PATCH 2/2] update PR id in Chart.yaml Signed-off-by: Silvan Loser <33911078+losil@users.noreply.github.com> --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 59517ec..49812cf 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -38,4 +38,4 @@ annotations: description: Reorder metrics list in HPA to avoid reconciliation loops with Argo CD links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/219 + url: https://github.com/oauth2-proxy/manifests/pull/220