Skip to content

Commit

Permalink
search env vars are optional
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Sep 5, 2023
1 parent 8b20d45 commit 23e6adb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions charts/alfresco-repository/templates/_helpers-search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,20 @@ Render search config as env vars in deployment
{{- with .Values.configuration.search }}
{{- $cm := coalesce .existingConfigMap.name (include "alfresco-repository.fullname" $cmCtx) }}
{{- range list "host" "port" "securecomms" }}
- name: {{ printf "SEARCH_%s" . }}
- name: {{ printf "SEARCH_%s" (upper .) }}
valueFrom:
configMapKeyRef:
name: {{ $cm }}
key: {{ index $.Values.configuration.search.existingConfigMap.keys . }}
optional: true
{{- end }}
{{- if eq "solr6" (include "alfresco-repository.search.flavor.valid" $.Values.configuration.search.flavor) }}
- name: SOLR_BASE_URL
valueFrom:
configMapKeyRef:
name: {{ $cm }}
key: {{ $.Values.configuration.search.existingConfigMap.keys.solr_base_url }}
{{- end }}
key: {{ .existingConfigMap.keys.solr_base_url }}
optional: true
{{- end }}
{{- end }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/alfresco-repository/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ spec:
{{- end }}
env:
{{ include "alfresco-repository.db.env" . | indent 12 }}
{{ include "alfresco-repository.search.env" . | indent 12 }}
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
Expand All @@ -92,6 +91,7 @@ spec:
{{- list $repoSecretsEnv | toYaml | nindent 12 }}
{{- end }}
{{- end }}
{{ include "alfresco-repository.search.env" . | indent 12 }}
- name: ELASTICSEARCH_USERNAME
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit 23e6adb

Please sign in to comment.