github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/keycloak/templates/hpa.yaml (about) 1 {{- if .Values.autoscaling.enabled }} 2 apiVersion: {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (semverCompare ">=1.23.0-0" .Capabilities.KubeVersion.Version) }} 3 kind: HorizontalPodAutoscaler 4 metadata: 5 name: {{ include "keycloak.fullname" . }} 6 namespace: {{ .Release.Namespace }} 7 labels: 8 {{- include "keycloak.labels" . | nindent 4 }} 9 {{- range $key, $value := .Values.autoscaling.labels }} 10 {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} 11 {{- end }} 12 spec: 13 scaleTargetRef: 14 apiVersion: apps/v1 15 kind: StatefulSet 16 name: {{ include "keycloak.fullname" . }} 17 minReplicas: {{ .Values.autoscaling.minReplicas }} 18 maxReplicas: {{ .Values.autoscaling.maxReplicas }} 19 metrics: 20 {{- toYaml .Values.autoscaling.metrics | nindent 4 }} 21 behavior: 22 {{- toYaml .Values.autoscaling.behavior | nindent 4 }} 23 {{- end }}