deploy-templates/templates/horizontalpodautoscaler.yaml (23 lines of code) (raw):
{{- if .Values.global.registry.bpms.hpa.enabled }}
kind: HorizontalPodAutoscaler
apiVersion: {{ include "horizontalPodAutoscaler.apiVersion" . }}
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
relatedNamespace: {{ .Release.Namespace }}
spec:
scaleTargetRef:
kind: Deployment
name: {{ .Chart.Name }}
apiVersion: apps/v1
minReplicas: {{ .Values.global.registry.bpms.hpa.minReplicas }}
maxReplicas: {{ .Values.global.registry.bpms.hpa.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
{{- end }}