istio.io/istio@v0.0.0-20240520182934-d79c90f27776/manifests/charts/gateways/istio-egress/templates/autoscale.yaml (about) 1 {{ $gateway := index .Values "gateways" "istio-egressgateway" }} 2 {{- if and $gateway.autoscaleEnabled $gateway.autoscaleMin $gateway.autoscaleMax }} 3 apiVersion: autoscaling/v2 4 kind: HorizontalPodAutoscaler 5 metadata: 6 name: {{ $gateway.name }} 7 namespace: {{ .Release.Namespace }} 8 labels: 9 {{ $gateway.labels | toYaml | indent 4 }} 10 release: {{ .Release.Name }} 11 istio.io/rev: {{ .Values.revision | default "default" | quote }} 12 install.operator.istio.io/owning-resource: {{ .Values.ownerName | default "unknown" }} 13 operator.istio.io/component: "EgressGateways" 14 spec: 15 maxReplicas: {{ $gateway.autoscaleMax }} 16 minReplicas: {{ $gateway.autoscaleMin }} 17 scaleTargetRef: 18 apiVersion: apps/v1 19 kind: Deployment 20 name: {{ $gateway.name }} 21 metrics: 22 - type: Resource 23 resource: 24 name: cpu 25 target: 26 type: Utilization 27 averageUtilization: {{ $gateway.cpu.targetAverageUtilization }} 28 --- 29 {{- end }}