Files
devops-infra-helm-charts-gcp/helm-templates/mimir-distributed/templates/gateway/gateway-v2-hpa.yaml
T
2026-08-26 03:39:42 +05:30

36 lines
1.1 KiB
YAML

{{- if .Values.gateway.autoscaling.enabled }}
{{- if eq (include "mimir.hpa.version" .) "autoscaling/v2" }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "mimir.resourceName" (dict "ctx" . "component" "gateway") }}
labels:
{{- include "mimir.labels" (dict "ctx" . "component" "gateway") | nindent 4 }}
namespace: {{ .Release.Namespace | quote }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "mimir.resourceName" (dict "ctx" . "component" "gateway") }}
minReplicas: {{ .Values.gateway.autoscaling.minReplicas }}
maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }}
metrics:
{{- with .Values.gateway.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- with .Values.gateway.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}