| {{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.prometheusOperator.verticalPodAutoscaler.enabled) }} |
| apiVersion: autoscaling.k8s.io/v1 |
| kind: VerticalPodAutoscaler |
| name: {{ template "kube-prometheus-stack.fullname" . }}-operator |
| namespace: {{ template "kube-prometheus-stack.namespace" . }} |
| app: {{ template "kube-prometheus-stack.name" . }}-operator |
| {{ include "kube-prometheus-stack.labels" . | indent 4 }} |
| {{- with .Values.prometheusOperator.verticalPodAutoscaler.recommenders }} |
| {{- toYaml . | nindent 4 }} |
| - containerName: {{ template "kube-prometheus-stack.name" . }} |
| {{- with .Values.prometheusOperator.verticalPodAutoscaler.controlledResources }} |
| {{- toYaml . | nindent 8 }} |
| {{- if .Values.prometheusOperator.verticalPodAutoscaler.controlledValues }} |
| controlledValues: {{ .Values.prometheusOperator.verticalPodAutoscaler.controlledValues }} |
| {{- if .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed }} |
| {{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed | nindent 8 }} |
| {{- if .Values.prometheusOperator.verticalPodAutoscaler.minAllowed }} |
| {{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.minAllowed | nindent 8 }} |
| name: {{ template "kube-prometheus-stack.fullname" . }}-operator |
| {{- with .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy }} |
| {{- toYaml . | nindent 4 }} |