Skip to content

Commit

Permalink
Merge pull request #108 from ministryofjustice/update-hpa-version
Browse files Browse the repository at this point in the history
Fix deprecated HPA API in helm
  • Loading branch information
brown-a2 authored Oct 4, 2023
2 parents 4af7a7e + 8cc6e77 commit 9b2f7bd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions helm_deploy/wordpress/templates/hpa-wordpress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.hpa.enabled }}
apiVersion: autoscaling/v1
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: hale-platform-hpa
Expand All @@ -11,9 +11,9 @@ spec:
name: wordpress
{{- if eq .Values.configmap.envtype "prod" }}
minReplicas: 3
maxReplicas: 20
maxReplicas: 12
{{- else if eq .Values.configmap.envtype "staging" }}
minReplicas: 3
minReplicas: 2
maxReplicas: 4
{{- else if eq .Values.configmap.envtype "demo" }}
minReplicas: 2
Expand All @@ -22,5 +22,11 @@ spec:
minReplicas: 1
maxReplicas: 1
{{- end }}
targetCPUUtilizationPercentage: 500
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 95
{{- end }}

0 comments on commit 9b2f7bd

Please sign in to comment.