123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- {{- if .Values.querier.autoscaling.enabled }}
- {{- $apiVersion := include "tempo.hpa.apiVersion" . -}}
- apiVersion: {{ $apiVersion }}
- kind: HorizontalPodAutoscaler
- metadata:
- name: {{ include "tempo.resourceName" (dict "ctx" . "component" "querier") }}
- labels:
- {{- include "tempo.labels" (dict "ctx" . "component" "querier") | nindent 4 }}
- spec:
- scaleTargetRef:
- apiVersion: apps/v1
- kind: Deployment
- name: {{ include "tempo.resourceName" (dict "ctx" . "component" "querier") }}
- minReplicas: {{ .Values.querier.autoscaling.minReplicas }}
- maxReplicas: {{ .Values.querier.autoscaling.maxReplicas }}
- {{- with .Values.querier.autoscaling.behavior }}
- behavior:
- {{- toYaml . | nindent 4 }}
- {{- end }}
- metrics:
- {{- with .Values.querier.autoscaling.targetMemoryUtilizationPercentage }}
- - type: Resource
- resource:
- name: memory
- {{- if (eq $apiVersion "autoscaling/v2") }}
- target:
- type: Utilization
- averageUtilization: {{ . }}
- {{- else }}
- targetAverageUtilization: {{ . }}
- {{- end }}
- {{- end }}
- {{- with .Values.querier.autoscaling.targetCPUUtilizationPercentage }}
- - type: Resource
- resource:
- name: cpu
- {{- if (eq $apiVersion "autoscaling/v2") }}
- target:
- type: Utilization
- averageUtilization: {{ . }}
- {{- else }}
- targetAverageUtilization: {{ . }}
- {{- end }}
- {{- end }}
- {{- end }}
|