Skip to content

Commit

Permalink
Create hpa.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
tripathishikha1 authored Jul 4, 2024
1 parent 87461a0 commit e3e82c4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions charts/microservice/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.hpa.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.hpa.minReplicas }}
maxReplicas: {{ .Values.hpa.maxReplicas }}
averageUtilization: {{ .Values.hpa.targetCPUUtilizationPercentage }}
{{- end }}

0 comments on commit e3e82c4

Please sign in to comment.