Commit de56b256 authored by Matt Pryor's avatar Matt Pryor
Browse files

Improve the ability to use an external Solr instance

parent 5cb3dd18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# esgf.properties file for the search application
{{- $solr := .Values.index.solr -}}
{{- if $solr.localEnabled }}
{{- if $solr.enabled }}
esg.search.solr.query.url=http://{{ include "esgf.component.fullname" (list . "solr" "slave") }}:8983/solr
esg.search.solr.publish.url=http://{{ include "esgf.component.fullname" (list . "solr" "master") }}:8983/solr
{{- else }}
+6 −2
Original line number Diff line number Diff line
{{- $solr := .Values.index.solr -}}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shards xmlns="http://www.esgf.org/whitelist">
    <!-- Local Solr instance -->
    {{- if $solr.localEnabled }}
    <!-- Solr slave instance -->
    {{- if $solr.enabled }}
    <value>{{ include "esgf.component.fullname" (list . "solr" "slave") }}:8983/solr</value>
    {{- else }}
    <value>{{ $solr.slaveExternalUrl }}</value>
@@ -10,6 +10,10 @@

    <!-- Replicas -->
    {{- range $solr.replicas }}
    {{- if $solr.enabled }}
    <value>{{ include "esgf.component.fullname" (list $ "solr" .name) }}:8983/solr</value>
    {{- else }}
    <value>{{ .masterUrl | required "Replica masterUrl is required" }}</value>
    {{- end }}
    {{- end }}
</shards>
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ spec:
          {{- end }}
          {{- end }}
          {{- if .Values.index.enabled }}
          {{- if .Values.index.solr.localEnabled }}
          {{- if .Values.index.solr.enabled }}
          # We only want to permit access to the replication handler for each core from outside
          # However wildcard paths are not supported on all ingress controllers
          # So we make a path definition for each core
+7 −4
Original line number Diff line number Diff line
@@ -3,12 +3,15 @@ Produce the value for the Solr shardsWhitelist parameter.
*/}}
{{- define "esgf.solr.shardsWhitelist" -}}
{{- $solr := .Values.index.solr -}}
{{- if $solr.localEnabled -}}
{{- if $solr.enabled -}}
{{- include "esgf.component.fullname" (list . "solr" "slave") }}:8983/solr
{{- else -}}
{{- $solr.slaveExternalUrl }}
{{- end -}}
{{- range $solr.replicas -}}
,{{ include "esgf.component.fullname" (list $ "solr" .name) }}:8983/solr
{{- end -}}
{{- else -}}
{{- $solr.slaveExternalUrl -}}
{{- range $solr.replicas -}}
,{{- .masterUrl | required "Replica masterUrl is required" -}}
{{- end -}}
{{- end -}}
{{- end -}}
+1 −1
Original line number Diff line number Diff line
{{- $solr := .Values.index.solr -}}
{{- if and .Values.index.enabled $solr.localEnabled -}}
{{- if and .Values.index.enabled $solr.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Loading