Skip to content

Commit

Permalink
Reorder opentelemetry-collector HPA metrics
Browse files Browse the repository at this point in the history
A current issue between ArgoCD (argoproj/argo-cd#1079) and Kubernetes (kubernetes/kubernetes#74099) makes the HPA stay constantly out of sync. This affects Gitops pipelines when both memory and CPU metrics are used to autoscale the deployment.

This change reorders metrics to make sure that they remain in the order that the Kubernetes HPA controller currently expects them to be.
  • Loading branch information
danielgblanco committed Nov 29, 2021
1 parent 1b90b45 commit 10c7b0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.8.0
version: 0.8.1
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
12 changes: 6 additions & 6 deletions charts/opentelemetry-collector/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ spec:
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- end }}

0 comments on commit 10c7b0e

Please sign in to comment.