mirror of
https://github.com/alexandrev/xslt-lab.git
synced 2026-09-20 04:23:16 +00:00
24 lines
677 B
YAML
24 lines
677 B
YAML
{{- if .Values.hpa.backend.enabled }}
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "xslt-playground.fullname" . }}-backend
|
|
labels:
|
|
{{- include "xslt-playground.labels" . | nindent 4 }}
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ include "xslt-playground.fullname" . }}-backend
|
|
minReplicas: {{ .Values.hpa.backend.minReplicas }}
|
|
maxReplicas: {{ .Values.hpa.backend.maxReplicas }}
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: {{ .Values.hpa.backend.targetCPUUtilizationPercentage }}
|
|
{{- end }}
|
|
|