From 9cfbe7ab57e412602eebcc35f74f04b44bd142cd Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Fri, 22 Nov 2024 11:15:27 +0200 Subject: [PATCH] update service acccount name template logic --- 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 }} {{/*