Skip to content

Commit

Permalink
Create missing hpa resource (#70)
Browse files Browse the repository at this point in the history
Co-authored-by: jlasut <jonasz.lasut@endava.com>
  • Loading branch information
jonasz-lasut and jonasz-lasut-endava authored Aug 27, 2024
1 parent 2b804b3 commit ead3a7e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions charts/komoplane/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "app.fullname" . }}
labels:
{{- include "app.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "app.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- with .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- end }}

0 comments on commit ead3a7e

Please sign in to comment.