github.com/replicatedcom/ship@v0.50.0/integration/init/istio-1.0.3/expected/.ship/upstream/charts/mixer/templates/autoscale.yaml (about)

     1  {{- range $key, $spec := .Values }}
     2  {{- if or (eq $key "istio-policy") (eq $key "istio-telemetry") }}
     3  {{- if and $spec.autoscaleEnabled $spec.autoscaleMin }}
     4  apiVersion: autoscaling/v2beta1
     5  kind: HorizontalPodAutoscaler
     6  metadata:
     7      name: {{ $key }}
     8      namespace: {{ $.Release.Namespace }}
     9  spec:
    10      maxReplicas: {{ $spec.autoscaleMax }}
    11      minReplicas: {{ $spec.autoscaleMin }}
    12      scaleTargetRef:
    13        apiVersion: apps/v1beta1
    14        kind: Deployment
    15        name: {{ $key }}
    16      metrics:
    17      - type: Resource
    18        resource:
    19          name: cpu
    20          targetAverageUtilization: {{ $spec.cpu.targetAverageUtilization }}
    21  ---
    22  {{- end }}
    23  {{- end }}
    24  {{- end }}