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"