mirror of
https://github.com/bitnami/charts.git
synced 2026-03-13 14:57:24 +08:00
29 lines
986 B
YAML
29 lines
986 B
YAML
{{- if .Values.server.autoscaling.enabled }}
|
|
apiVersion: autoscaling/v2beta1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "scdf.fullname" . }}-server
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
name: {{ include "scdf.fullname" . }}-server
|
|
minReplicas: {{ .Values.server.autoscaling.minReplicas }}
|
|
maxReplicas: {{ .Values.server.autoscaling.maxReplicas }}
|
|
metrics:
|
|
{{- if .Values.server.autoscaling.targetCPU }}
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
targetAverageUtilization: {{ .Values.server.autoscaling.targetCPU }}
|
|
{{- end }}
|
|
{{- if .Values.server.autoscaling.targetMemory }}
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
targetAverageUtilization: {{ .Values.server.autoscaling.targetMemory }}
|
|
{{- end }}
|
|
{{- end }}
|