{{- if .Values.kubecostAggregator.cloudCost.enabled }} {{- if and .Values.serviceAccount.create .Values.kubecostAggregator.cloudCost.serviceAccountName }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "cloudCost.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: {{ include "cloudCost.commonLabels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} {{- end }} {{- end }}