From bacd6a06746afc23e2e8075ddb247c57991ecffe Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 23 Oct 2023 14:58:30 +0200 Subject: [PATCH] set ES credentials in secrets --- .../templates/secret-search.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/helm/alfresco-content-services/templates/secret-search.yaml b/helm/alfresco-content-services/templates/secret-search.yaml index 30d003a2c..584d327b3 100644 --- a/helm/alfresco-content-services/templates/secret-search.yaml +++ b/helm/alfresco-content-services/templates/secret-search.yaml @@ -1,11 +1,18 @@ -{{- if eq "secret" .Values.global.search.securecomms }} +{{- with .Values.global.search }} +{{- if or .password (eq "secret" .securecomms) }} apiVersion: v1 kind: Secret metadata: - name: {{ .Values.global.search.secretName }} + name: {{ .secretName }} labels: - {{- include "alfresco-content-services.labels" . | nindent 4 }} + {{- include "alfresco-content-services.labels" $ | nindent 4 }} type: Opaque data: - SOLR_SECRET: {{ .Values.global.search.sharedSecret | default "" | b64enc | quote }} +{{- if eq "secret" .securecomms }} + SOLR_SECRET: {{ .sharedSecret | default "" | b64enc | quote }} +{{- else }} + SEARCH_USERNAME: {{ .username | default "" | b64enc | quote }} + SEARCH_PASSWORD: {{ .password | default "" | b64enc | quote }} +{{- end }} +{{- end }} {{- end }}