Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

HPA Bug fix with updated api version #61

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ spec:
- type: Resource
Copy link
Contributor

@charlie-haley charlie-haley Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of trying to define the resources, we should probably just change this to take any YAML object, then we dont have to worry about target types/backwards compability, e.g something like:

{{- with .Values.autoscaling.metrics }}
  metrics:
{{- toYaml . | indent 4 }}
{{- end }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge your current change however, as this will be a breaking change and we'll probably want to ship a few of them together

resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- with .Values.autoscaling.customMetric -}}
{{ toYaml . | nindent 4 }}
Expand Down
Loading