{{- if and .Values.etcd.managed .Values.serviceAccounts.etcd.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.serviceAccounts.etcd.name | quote }} namespace: {{ .Release.Namespace }} {{- if or .Values.serviceAccounts.etcd.annotations .Values.etcd.annotations }} annotations: {{- with .Values.etcd.annotations }} {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.serviceAccounts.etcd.annotations }} {{- toYaml . | nindent 4 }} {{- end }} {{- end }} {{- end }}