{{- if and (not .Values.agent) (not .Values.cloudAgent) (.Values.kubecostDeployment) (.Values.kubecostDeployment.queryServiceReplicas) }} {{- if gt (.Values.kubecostDeployment.queryServiceReplicas | toString | atoi) 0 }} {{- if .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "query-service.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: {{ include "query-service.commonLabels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} {{- end }} {{- end }} {{- end }}