{{- if eq (include "aggregator.deployMethod" .) "statefulset" }} {{/* A cloud integration secret is required for cloud cost to function as a dedicated pod. UI based configuration is not supported for cloud cost with aggregator. */}} {{- if or (.Values.kubecostProductConfigs).cloudIntegrationSecret (.Values.kubecostProductConfigs).cloudIntegrationJSON ((.Values.kubecostProductConfigs).athenaBucketName) }} {{- 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 }} {{- end }}