deploy-templates/templates/HorizontalPodAutoscaler.yaml (25 lines of code) (raw):
{{- if or (not .Values.global.excludePortals) (not (has "citizen" .Values.global.excludePortals)) (not (has "officer" .Values.global.excludePortals)) }}
{{- if not .Values.global.disableRequestsLimits }}
kind: HorizontalPodAutoscaler
apiVersion: {{ include "horizontalPodAutoscaler.apiVersion" . }}
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
relatedNamespace: {{ .Release.Namespace }}
spec:
scaleTargetRef:
kind: Deployment
name: {{ .Values.name }}-deployment
apiVersion: apps/v1
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
{{- end }}
{{- end }}