From 8542e1f02d518a30cf2ff0fa4a7af24ab1a76dff Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Tue, 4 Oct 2022 15:04:33 +0300 Subject: [PATCH] add an extra if --- charts/common/templates/lib/controller/_prepare.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/common/templates/lib/controller/_prepare.tpl b/charts/common/templates/lib/controller/_prepare.tpl index 9b0f4b20..3fb6c843 100644 --- a/charts/common/templates/lib/controller/_prepare.tpl +++ b/charts/common/templates/lib/controller/_prepare.tpl @@ -63,7 +63,7 @@ before chart installation. key: ping {{- end }} {{- if .Values.solr.enabled }} - - name: "SOLR_HOST" + - name: SOLR_HOST valueFrom: secretKeyRef: name: solrcreds @@ -72,6 +72,7 @@ before chart installation. value: "{{ .Values.solr.solrCores }}" - name: SOLR_ENABLE_AUTHENTICATION value: "{{ .Values.solr.solrEnableAuthentication }}" + {{- if eq .Values.solr.solrEnableAuthentication "yes" }} - name: SOLR_ADMIN_USERNAME value: "{{ .Values.solr.solrUsername }}" - name: SOLR_ADMIN_PASSWORD @@ -80,6 +81,7 @@ before chart installation. name: solrcreds key: solr-password {{- end }} + {{- end }} command: - "/bin/sh" - "-c"