mirror of
https://github.com/bvanroll/test-repo.git
synced 2025-08-29 12:02:39 +00:00
25 lines
747 B
YAML
Executable File
25 lines
747 B
YAML
Executable File
{{- if .Values.hpa.enabled }}
|
|
apiVersion: autoscaling/v2beta1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ template "fullname" . }}
|
|
labels:
|
|
draft: {{ default "draft-app" .Values.draft }}
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ template "fullname" . }}
|
|
minReplicas: {{ .Values.hpa.minReplicas }}
|
|
maxReplicas: {{ .Values.hpa.maxReplicas }}
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
targetAverageUtilization: {{ .Values.hpa.cpuTargetAverageUtilization }}
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
targetAverageUtilization: {{ .Values.hpa.memoryTargetAverageUtilization }}
|
|
{{- end }} |