{{/* Replicates the openbao-helm subchart's "openbao.fullname" naming logic so our own templates (ClusterSecretStore, bootstrap Job) can address its Service without hardcoding "-openbao", which is wrong whenever the release name already contains "openbao" (Helm's standard fullname collapsing). */}} {{- define "openbao-gitops.openbaoFullname" -}} {{- if (index .Values "openbao" "fullnameOverride") -}} {{- index .Values "openbao" "fullnameOverride" | trunc 63 | trimSuffix "-" -}} {{- else if contains "openbao" .Release.Name -}} {{- .Release.Name | trunc 63 | trimSuffix "-" -}} {{- else -}} {{- printf "%s-openbao" .Release.Name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{- end -}}