Files
charts/bitnami/spring-cloud-dataflow/templates/server/hpa.yaml
Javier J. Salmerón-García 3f7ed3f9f5 [bitnami/scdf] General improvements (#5719)
* [bitnami/scdf] General improvements

* Add TLS section

* Update bitnami/spring-cloud-dataflow/README.md

Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com>

* Apply suggestions

Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com>
2021-03-08 12:52:57 +01:00

36 lines
1.3 KiB
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
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
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 }}