blob: 6f6a887cca60733b645573e25321d5e609153ecc [file] [log] [blame]
{{- if .Values.bootstrap.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
namespace: {{ .Release.Namespace }}
name: {{ template "common.names.fullname" . }}-bootstrap
labels:
{{- include "shenyu.bootstrap.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "common.names.fullname" . }}-bootstrap
minReplicas: {{ .Values.bootstrap.autoscaling.minReplicas }}
maxReplicas: {{ .Values.bootstrap.autoscaling.maxReplicas }}
metrics:
{{- if .Values.bootstrap.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.bootstrap.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.bootstrap.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.bootstrap.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}