1 {{- if .Values.autoscaling.enabled }}
2 apiVersion: {{ include "kong.autoscalingVersion" . }}
3 kind: HorizontalPodAutoscaler
5 name: "{{ template "kong.fullname" . }}"
6 namespace: {{ template "kong.namespace" . }}
8 {{- include "kong.metaLabels" . | nindent 4 }}
13 name: "{{ template "kong.fullname" . }}"
14 minReplicas: {{ .Values.autoscaling.minReplicas }}
15 maxReplicas: {{ .Values.autoscaling.maxReplicas }}
16 {{- if .Values.autoscaling.behavior }}
18 {{- toYaml .Values.autoscaling.behavior | nindent 4 }}
20 {{- if contains "autoscaling/v2" (include "kong.autoscalingVersion" . ) }}
22 {{- toYaml .Values.autoscaling.metrics | nindent 4 }}
24 targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage | default 80 }}