blob: 3859cad0c7414619fcf9ed42b2dd26f1a9e65a8f [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if .Values.serviceAccount.create }}
7apiVersion: v1
8kind: ServiceAccount
9metadata:
10 name: {{ template "keycloak.serviceAccountName" . }}
11 namespace: {{ include "common.names.namespace" . | quote }}
12 labels: {{- include "common.labels.standard" . | nindent 4 }}
13 app.kubernetes.io/component: keycloak
14 {{- if .Values.commonLabels }}
15 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
16 {{- end }}
17 {{- if .Values.serviceAccount.extraLabels }}
18 {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.extraLabels "context" $) | nindent 4 }}
19 {{- end }}
20 {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
21 annotations:
22 {{- if .Values.commonAnnotations }}
23 {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
24 {{- end }}
25 {{- if .Values.serviceAccount.annotations }}
26 {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }}
27 {{- end }}
28 {{- end }}
29automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
30{{- end }}