mirror of https://git.rancher.io/charts
36 lines
1.6 KiB
YAML
36 lines
1.6 KiB
YAML
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.prometheusOperator.verticalPodAutoscaler.enabled) }}
|
|
apiVersion: autoscaling.k8s.io/v1
|
|
kind: VerticalPodAutoscaler
|
|
metadata:
|
|
name: {{ template "kube-prometheus-stack.fullname" . }}-operator
|
|
namespace: {{ template "kube-prometheus-stack.namespace" . }}
|
|
labels:
|
|
app: {{ template "kube-prometheus-stack.name" . }}-operator
|
|
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
|
|
spec:
|
|
resourcePolicy:
|
|
containerPolicies:
|
|
- containerName: {{ template "kube-prometheus-stack.name" . }}
|
|
{{- if .Values.prometheusOperator.verticalPodAutoscaler.controlledResources }}
|
|
controlledResources: {{ .Values.prometheusOperator.verticalPodAutoscaler.controlledResources }}
|
|
{{- end }}
|
|
{{- if .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed }}
|
|
maxAllowed:
|
|
{{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.prometheusOperator.verticalPodAutoscaler.minAllowed }}
|
|
minAllowed:
|
|
{{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.minAllowed | nindent 8 }}
|
|
{{- end }}
|
|
targetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ template "kube-prometheus-stack.fullname" . }}-operator
|
|
{{- if .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy }}
|
|
updatePolicy:
|
|
{{- if .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy.updateMode }}
|
|
updateMode: {{ .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy.updateMode }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|