common-helm-lib/templates/_serviceaccount.tpl

15 lines
429 B
Smarty
Raw Normal View History

2024-10-15 14:19:57 +00:00
{{- define "lib.serviceaccount" -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "lib.serviceAccountName" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "lib.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}