1234567891011121314151617181920212223242526272829303132333435363738394041 |
- {{- 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 }}
|