Adding dependencies, binary autostart
This commit is contained in:
55
opencloud/charts/loki/templates/ingester/hpa-zone-c.yaml
Normal file
55
opencloud/charts/loki/templates/ingester/hpa-zone-c.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
|
||||
{{- if and $isDistributed .Values.ingester.autoscaling.enabled .Values.ingester.zoneAwareReplication.enabled }}
|
||||
{{- $apiVersion := include "loki.hpa.apiVersion" . -}}
|
||||
apiVersion: {{ $apiVersion }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "loki.ingesterFullname" . }}-zone-c
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "loki.ingesterLabels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: {{ include "loki.ingesterFullname" . }}-zone-c
|
||||
minReplicas: {{ .Values.ingester.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.ingester.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- with .Values.ingester.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if (eq $apiVersion "autoscaling/v2") }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- else }}
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingester.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if (eq $apiVersion "autoscaling/v2") }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- else }}
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingester.autoscaling.customMetrics }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingester.autoscaling.behavior.enabled }}
|
||||
behavior:
|
||||
{{- with .Values.ingester.autoscaling.behavior.scaleDown }}
|
||||
scaleDown: {{ toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingester.autoscaling.behavior.scaleUp }}
|
||||
scaleUp: {{ toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user