es mongodb
This commit is contained in:
35
elasticsearch/templates/data-hpa.yaml
Normal file
35
elasticsearch/templates/data-hpa.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
{{- if .Values.data.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.data.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: data
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: {{ template "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
name: {{ include "elasticsearch.data.fullname" . }}
|
||||
minReplicas: {{ .Values.data.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.data.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.data.autoscaling.targetCPU }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.data.autoscaling.targetCPU }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.autoscaling.targetMemory }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.data.autoscaling.targetMemory }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user