{{- if eq (include "gitea.serviceAccount.enabled" .) "true" }} --- apiVersion: v1 kind: ServiceAccount metadata: {{- with (include "gitea.serviceAccount.annotations" .) }} annotations: {{- . | nindent 4 }} {{- end }} {{- with (include "gitea.serviceAccount.labels" .) }} labels: {{- . | nindent 4 }} {{- end }} name: {{ include "gitea.serviceAccount.name" . }} namespace: {{ .Values.namespace | default .Release.Namespace }} automountServiceAccountToken: {{ .Values.serviceAccount.new.automountServiceAccountToken }} {{- with .Values.serviceAccount.new.imagePullSecrets }} imagePullSecrets: {{- . | toYaml | nindent 2 }} {{- end }} {{- end }}