| Giorgi Lekveishvili | 3598266 | 2024-04-05 13:05:40 +0400 | [diff] [blame] | 1 | {{ if .Values.serviceAccount.create }} |
| 2 | apiVersion: v1 |
| 3 | kind: ServiceAccount |
| 4 | metadata: |
| 5 | name: {{ include "jenkins.serviceAccountName" . }} |
| 6 | namespace: {{ template "jenkins.namespace" . }} |
| 7 | {{- if .Values.serviceAccount.annotations }} |
| 8 | annotations: |
| 9 | {{ tpl (toYaml .Values.serviceAccount.annotations) . | indent 4 }} |
| 10 | {{- end }} |
| 11 | labels: |
| 12 | "app.kubernetes.io/name": '{{ template "jenkins.name" .}}' |
| 13 | {{- if .Values.renderHelmLabels }} |
| 14 | "helm.sh/chart": "{{ template "jenkins.label" .}}" |
| 15 | {{- end }} |
| 16 | "app.kubernetes.io/managed-by": "{{ .Release.Service }}" |
| 17 | "app.kubernetes.io/instance": "{{ .Release.Name }}" |
| 18 | "app.kubernetes.io/component": "{{ .Values.controller.componentName }}" |
| 19 | {{- if .Values.serviceAccount.extraLabels }} |
| 20 | {{ tpl (toYaml .Values.serviceAccount.extraLabels) . | indent 4 }} |
| 21 | {{- end }} |
| 22 | {{- if .Values.serviceAccount.imagePullSecretName }} |
| 23 | imagePullSecrets: |
| 24 | - name: {{ .Values.serviceAccount.imagePullSecretName }} |
| 25 | {{- end -}} |
| 26 | {{ end }} |