github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus-operator/verticalpodautoscaler.yaml (about) 1 {{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.prometheusOperator.verticalPodAutoscaler.enabled) }} 2 apiVersion: autoscaling.k8s.io/v1 3 kind: VerticalPodAutoscaler 4 metadata: 5 name: {{ template "kube-prometheus-stack.fullname" . }}-operator 6 namespace: {{ template "kube-prometheus-stack.namespace" . }} 7 labels: 8 app: {{ template "kube-prometheus-stack.name" . }}-operator 9 {{ include "kube-prometheus-stack.labels" . | indent 4 }} 10 spec: 11 resourcePolicy: 12 containerPolicies: 13 - containerName: {{ template "kube-prometheus-stack.name" . }} 14 {{- if .Values.prometheusOperator.verticalPodAutoscaler.controlledResources }} 15 controlledResources: {{ .Values.prometheusOperator.verticalPodAutoscaler.controlledResources }} 16 {{- end }} 17 {{- if .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed }} 18 maxAllowed: 19 {{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed | nindent 8 }} 20 {{- end }} 21 {{- if .Values.prometheusOperator.verticalPodAutoscaler.minAllowed }} 22 minAllowed: 23 {{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.minAllowed | nindent 8 }} 24 {{- end }} 25 targetRef: 26 apiVersion: apps/v1 27 kind: Deployment 28 name: {{ template "kube-prometheus-stack.fullname" . }}-operator 29 {{- if .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy }} 30 updatePolicy: 31 {{- if .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy.updateMode }} 32 updateMode: {{ .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy.updateMode }} 33 {{- end }} 34 {{- end }} 35 {{- end }}