From f43d43f4b3b9c474813060c2d71bb16fd176b010 Mon Sep 17 00:00:00 2001 From: Matthew B <106352182+artntek@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:29:43 -0800 Subject: [PATCH] DRY --- helm/templates/_helpers.tpl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 18f51887..503c0f3f 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -69,10 +69,11 @@ If connecting to an instance outside the cluster, should use https; e.g. https://metacat-dev.test.dataone.org/metacat/d1/mn */}} {{- define "idxworker.mn.url" -}} -{{- if not .Values.idxworker.mn_url }} +{{- $mn_url := .Values.idxworker.mn_url }} +{{- if not $mn_url }} {{- printf "http://%s-hl:8080/%s/d1/mn" .Release.Name .Values.global.metacatAppContext }} {{- else }} -{{- .Values.idxworker.mn_url }} +{{- $mn_url }} {{- end }} {{- end }} @@ -82,10 +83,11 @@ Either use the value set in .Values.persistence.claimName, or if blank, autopopu {podname}-metacat-{releaseName}-0 (e.g. metacatbrooke-metacat-metacatbrooke-0) */}} {{- define "idxworker.shared.claimName" -}} -{{- if not .Values.persistence.claimName }} +{{- $claimName := .Values.persistence.claimName }} +{{- if not $claimName }} {{- .Release.Name }}-metacat-{{- .Release.Name }}-0 {{- else }} -{{- .Values.persistence.claimName }} +{{- $claimName }} {{- end }} {{- end }}