{{- if or (and (ne (.Values.connectInject.enabled | toString) "-") .Values.connectInject.enabled) (and (eq (.Values.connectInject.enabled | toString) "-") .Values.global.enabled) }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "consul.fullname" . }}-connect-injector namespace: {{ .Release.Namespace }} labels: app: {{ template "consul.name" . }} chart: {{ template "consul.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} component: connect-injector {{- if .Values.connectInject.serviceAccount.annotations }} annotations: {{ tpl .Values.connectInject.serviceAccount.annotations . | nindent 4 | trim }} {{- end }} {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- range . }} - name: {{ .name }} {{- end }} {{- end }} {{- end }}