1234567891011121314151617181920212223242526272829303132 |
- {{- if and .Values.autoscaling.enabled (eq .Values.mode "deployment") }}
- apiVersion: autoscaling/v2
- kind: HorizontalPodAutoscaler
- metadata:
- name: {{ include "opentelemetry-collector.fullname" . }}
- labels:
- {{- include "opentelemetry-collector.labels" . | nindent 4 }}
- spec:
- scaleTargetRef:
- apiVersion: apps/v1
- kind: Deployment
- name: {{ include "opentelemetry-collector.fullname" . }}
- minReplicas: {{ .Values.autoscaling.minReplicas }}
- maxReplicas: {{ .Values.autoscaling.maxReplicas }}
- metrics:
- {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- - type: Resource
- resource:
- name: memory
- target:
- type: Utilization
- averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
- {{- end }}
- {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- - type: Resource
- resource:
- name: cpu
- target:
- type: Utilization
- averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
- {{- end }}
- {{- end }}
|