Added hpa to webspa

This commit is contained in:
Jamie Whitney 2021-10-30 09:37:59 +01:00
parent 42abcad37e
commit 110e4180f5

View File

@ -0,0 +1,30 @@
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "webspa.fullname" . }}
labels:
ufo: {{ $cfgname}}
app: {{ template "webspa.name" . }}
chart: {{ template "webspa.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "webspa.fullname" . }}
minReplicas: 3
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 50