Skip to content

Commit

Permalink
Fix custom metrics hpa template (#359)
Browse files Browse the repository at this point in the history
fix custom metrics hpa template
  • Loading branch information
PierreBesson authored Sep 26, 2024
1 parent 8e501b4 commit c5fb2f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: A generic helm chart for Kubernetes
type: application
version: 0.8.0
version: 0.8.1
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
5 changes: 3 additions & 2 deletions charts/common/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.customMetrics }}
{{- toYaml .Values.autoscaling.customMetrics | nindent 8 }}
{{- else }}
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
Expand All @@ -42,7 +45,5 @@ spec:
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- end }}
{{- if .Values.autoscaling.customMetrics }}
{{- toYaml .Values.autoscaling.customMetrics | nindent 8 }}
{{- end }}
{{- end }}

0 comments on commit c5fb2f5

Please sign in to comment.