From 922bb1c7c28962595b964beb344814d2b2407302 Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Fri, 22 Nov 2024 11:29:55 +0200 Subject: [PATCH] update service acccount name template logic (#561) Co-authored-by: Aleksandr Cupacenko --- charts/helm-dashboard/templates/_helpers.tpl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/charts/helm-dashboard/templates/_helpers.tpl b/charts/helm-dashboard/templates/_helpers.tpl index 1cb76764..2fef9482 100644 --- a/charts/helm-dashboard/templates/_helpers.tpl +++ b/charts/helm-dashboard/templates/_helpers.tpl @@ -54,11 +54,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} Create the name of the service account to use */}} {{- define "helm-dashboard.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "helm-dashboard.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} +{{- default (.Values.serviceAccount.create | ternary (include "helm-dashboard.fullname" .) "default") .Values.serviceAccount.name }} {{- end }} {{/*