{{- if and (.Values.notifications.vpa) (.Values.notifications.vpa.enabled) }} apiVersion: autoscaling.k8s.io/v1 kind: VerticalPodAutoscaler metadata: name: {{ include "argo-cd.notifications.fullname" . }} namespace: {{ include "argo-cd.namespace" . }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }} {{- with .Values.notifications.vpa.labels }} {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.notifications.vpa.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- with .Values.notifications.vpa.recommenders }} recommenders: {{- toYaml . | nindent 4 }} {{- end }} targetRef: apiVersion: "apps/v1" kind: Deployment name: {{ template "argo-cd.notifications.fullname" . }} updatePolicy: updateMode: {{ .Values.notifications.vpa.updateMode | quote }} resourcePolicy: containerPolicies: - containerName: {{ .Values.notifications.name }} {{ with .Values.notifications.vpa.containerPolicy }} {{- toYaml . | nindent 6 }} {{- end }} {{- end }}