-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-1862: add search config (#94)
- Loading branch information
Showing
13 changed files
with
421 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
dependencies: | ||
- name: alfresco-common | ||
repository: https://alfresco.github.io/alfresco-helm-charts/ | ||
version: 2.1.0-alpha.2 | ||
version: 2.1.0-alpha.4 | ||
- name: postgresql | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 12.5.6 | ||
digest: sha256:2fc15d92a0fa85b0f7b7b5fa3340fa881b3dfc9c64afe0433afd5ebe374158c6 | ||
generated: "2023-07-31T13:57:22.409425+02:00" | ||
digest: sha256:fc198ff15a70999cb84eae6ea08e68f73168a0f6495c127efb0f1b9f7b1ebb69 | ||
generated: "2023-08-07T21:24:10.004093+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
charts/alfresco-repository/templates/_helpers-checksums.tpl
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{/* | ||
Validate search flavor by checking it is set to either "noindex", "solr6" or "elasticsearch" | ||
Usage: include "alfresco-repository.search.flavor.valid" "FLAVOR" | ||
*/}} | ||
{{- define "alfresco-repository.search.flavor.valid" -}} | ||
{{- if not (mustHas . (list "noindex" "solr6" "elasticsearch")) }} | ||
{{- fail "Search Service flavor MUST be one of 'noindex', 'solr6' or 'elasticsearch'" }} | ||
{{- else -}} | ||
{{- . }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Check whether a Solr shared secret was provided | ||
Usage: include "alfresco-repository.solr.security" (dict "ns" "" "search" (dict "existingConfigMap" (dict "name" "" "keys" (dict "solr-secret" "")))) | ||
*/}} | ||
{{- define "alfresco-repository.solr.security" -}} | ||
{{ $ns := .ns }} | ||
{{- with .search }} | ||
{{- if .existingSecret.name }} | ||
{{- $defaultLookup := (dict "data" dict) }} | ||
{{- $lookup := lookup "v1" "Secret" $ns .existingSecret.name | default $defaultLookup }} | ||
{{- hasKey $lookup.data (index .existingSecret.keys "solr-secret") | ternary "secret" "none" }} | ||
{{- else -}} | ||
{{- not (empty (index . "solr-secret")) | ternary "secret" "none" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Alfresco Repository search configuration | ||
Usage: include "alfresco-repository.search.config" $ | ||
*/}} | ||
{{- define "alfresco-repository.search.config" -}} | ||
{{- with .Values.configuration.search }} | ||
{{- $search_url := include "alfresco-common.read.cm.then.value" (dict "ns" $.Release.Namespace "key" "url" "context" .) }} | ||
{{- if eq "solr6" (include "alfresco-repository.search.flavor.valid" .flavor) }} | ||
-Dsolr.host={{ template "alfresco-common.url.host" $search_url }} | ||
-Dsolr.port={{ template "alfresco-common.url.port" $search_url }} | ||
-Dsolr.base.url={{ include "alfresco-common.url.path" $search_url | default "/solr" }} | ||
{{- $solr_comms := include "alfresco-repository.solr.security" (dict "ns" $.Release.Namespace "search" . ) }} | ||
-Dsolr.secureComms={{ $solr_comms }} | ||
{{- if eq "secret" $solr_comms }} | ||
-Dsolr.sharedSecret=$SOLR_SECRET | ||
{{- end }} | ||
{{- else if eq "elasticsearch" (include "alfresco-repository.search.flavor.valid" .flavor) }} | ||
-Delasticsearch.host={{ template "alfresco-common.url.host" $search_url }} | ||
-Delasticsearch.port={{ template "alfresco-common.url.port" $search_url }} | ||
-Delasticsearch.secureComms={{ eq "https" (include "alfresco-common.url.scheme" $search_url) | ternary "https" "none" }} | ||
-Delasticsearch.user=$ELASTICSEARCH_USERNAME | ||
-Delasticsearch.password=$ELASTICSEARCH_PASSWORD | ||
-Delasticsearch.createIndexIfNotExists=true | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- with .Values.configuration.search }} | ||
{{- if and (not (eq .flavor "noindex")) (not .existingSecret.name) (or (index . "solr-secret") (and .username .password)) }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
{{- $searchsecretCtx := dict "Values" (dict "nameOverride" "secret-search") "Chart" $.Chart "Release" $.Release }} | ||
name: {{ template "alfresco-repository.fullname" $searchsecretCtx }} | ||
labels: | ||
{{- include "alfresco-repository.labels" $ | nindent 4 }} | ||
type: Opaque | ||
data: | ||
{{- if eq .flavor "solr6" }} | ||
SOLR_SECRET: {{ index . "solr-secret" | b64enc | quote }} | ||
{{- end }} | ||
{{- if eq .flavor "elasticsearch" }} | ||
ELASTICSEARCH_USERNAME: {{ .username | b64enc | quote }} | ||
ELASTICSEARCH_PASSWORD: {{ .password | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if and (not .Values.persistence.existingClaim) .Values.persistence.enabled }} | ||
{{- include "alfresco-common.component_pvc" .Values }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.