Files
2026-08-26 03:39:42 +05:30

42 lines
1.6 KiB
YAML

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