Andreas Geissler | cde4a78 | 2024-02-28 16:08:06 +0100 | [diff] [blame^] | 1 | {{- /* |
| 2 | Copyright VMware, Inc. |
| 3 | SPDX-License-Identifier: APACHE-2.0 |
| 4 | */}} |
| 5 | |
| 6 | {{- if .Values.serviceAccount.create }} |
| 7 | apiVersion: v1 |
| 8 | kind: ServiceAccount |
| 9 | metadata: |
| 10 | name: {{ include "mongodb.serviceAccountName" . }} |
| 11 | namespace: {{ include "mongodb.namespace" . | quote }} |
| 12 | labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} |
| 13 | {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} |
| 14 | {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }} |
| 15 | annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} |
| 16 | {{- end }} |
| 17 | secrets: |
| 18 | - name: {{ template "mongodb.fullname" . }} |
| 19 | automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} |
| 20 | {{- end }} |