{{- if and .Values.serviceAccount.create .Values.recommender.enabled -}}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
metadata:
  name: {{ include "vpa.serviceAccountName" . }}-recommender
  labels:
    {{- include "vpa.labels" . | nindent 4 }}
    app.kubernetes.io/component: recommender
  {{- with .Values.serviceAccount.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
{{- end }}
