23 lines
1.1 KiB
YAML
23 lines
1.1 KiB
YAML
{{- if and (include "elasticsearch.data.enabled" .) .Values.data.serviceAccount.create -}}
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: {{ include "elasticsearch.data.serviceAccountName" . }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: data
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if or .Values.data.serviceAccount.annotations .Values.commonAnnotations }}
|
|
annotations:
|
|
{{- if .Values.commonAnnotations }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.data.serviceAccount.annotations }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.data.serviceAccount.annotations "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
automountServiceAccountToken: {{ .Values.data.serviceAccount.automountServiceAccountToken }}
|
|
{{- end -}}
|