diff --git a/charts/alfresco-search-enterprise/Chart.lock b/charts/alfresco-search-enterprise/Chart.lock index 94fa0c44..cd9526ab 100644 --- a/charts/alfresco-search-enterprise/Chart.lock +++ b/charts/alfresco-search-enterprise/Chart.lock @@ -8,5 +8,5 @@ dependencies: - name: elasticsearch repository: https://helm.elastic.co version: 7.17.3 -digest: sha256:d1d6c8303e0953b98f5e315fdcf120bc037f227843e785df66abd68e3150ea90 -generated: "2023-10-19T19:42:24.344873+02:00" +digest: sha256:add38efb79f9791c5d302b13ed108b74adb77fdbffac66a7d6ce7fa9df05fa21 +generated: "2023-10-20T18:43:51.870175+02:00" diff --git a/charts/alfresco-search-enterprise/Chart.yaml b/charts/alfresco-search-enterprise/Chart.yaml index 771056d7..68101283 100644 --- a/charts/alfresco-search-enterprise/Chart.yaml +++ b/charts/alfresco-search-enterprise/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: alfresco-search-enterprise description: A Helm chart for deploying Alfresco Elasticsearch connector type: application -version: 3.0.0-alpha.5 +version: 3.0.0-alpha.6 appVersion: 3.3.1 dependencies: - name: alfresco-common @@ -17,4 +17,5 @@ dependencies: - name: elasticsearch repository: https://helm.elastic.co version: 7.17.3 - condition: elasticsearch.enabled + tags: + - ci diff --git a/charts/alfresco-search-enterprise/README.md b/charts/alfresco-search-enterprise/README.md index f1240ede..4af9ca17 100644 --- a/charts/alfresco-search-enterprise/README.md +++ b/charts/alfresco-search-enterprise/README.md @@ -1,6 +1,6 @@ # alfresco-search-enterprise -![Version: 3.0.0-alpha.5](https://img.shields.io/badge/Version-3.0.0--alpha.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.1](https://img.shields.io/badge/AppVersion-3.3.1-informational?style=flat-square) +![Version: 3.0.0-alpha.6](https://img.shields.io/badge/Version-3.0.0--alpha.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.1](https://img.shields.io/badge/AppVersion-3.3.1-informational?style=flat-square) A Helm chart for deploying Alfresco Elasticsearch connector @@ -26,18 +26,8 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b | ats.transform_url | string | `nil` | URL of the alfresco transform (trouter or tengine-aio) | | contentMediaTypeCache.enabled | bool | `true` | | | contentMediaTypeCache.refreshTime | string | `"0 0 * * * *"` | | -| elasticsearch.clusterHealthCheckParams | string | `"wait_for_status=yellow&timeout=1s"` | | -| elasticsearch.enabled | bool | `false` | Enable embedded elasticsearch - useful when using this chart in standalone | -| elasticsearch.replicas | int | `1` | | | fullnameOverride | string | `""` | | | global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | | -| global.elasticsearch | object | `{"existingSecretName":null,"host":null,"password":null,"port":null,"protocol":null,"user":null}` | Shared connections details for Elasticsearch/Opensearch cluster | -| global.elasticsearch.existingSecretName | string | `nil` | Alternatively, provide connection details via an existing secret that contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys | -| global.elasticsearch.host | string | `nil` | The host where service is available | -| global.elasticsearch.password | string | `nil` | The password required to access the service, if any | -| global.elasticsearch.port | string | `nil` | The port where service is available | -| global.elasticsearch.protocol | string | `nil` | Valid values are http or https | -| global.elasticsearch.user | string | `nil` | The username required to access the service, if any | | imagePullSecrets | list | `[]` | | | indexName | string | `"alfresco"` | Name of the existing search index, usually created by repo | | liveIndexing.content.image.pullPolicy | string | `"IfNotPresent"` | | @@ -55,8 +45,8 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b | liveIndexing.path.image.repository | string | `"quay.io/alfresco/alfresco-elasticsearch-live-indexing-path"` | | | liveIndexing.path.image.tag | string | `"3.3.1"` | | | liveIndexing.path.replicaCount | int | `1` | | -| messageBroker.existingConfigMap | object | `{"keys":{"url":"BROKER_URL"},"name":null}` | Alternatively, provide message broker connection details via an existing configmap | | messageBroker.existingConfigMap.keys.url | string | `"BROKER_URL"` | Key within the configmap holding the URL of the message broker | +| messageBroker.existingConfigMap.name | string | `nil` | Alternatively, provide message broker connection details via an existing configmap | | messageBroker.existingSecret | object | `{"keys":{"password":"BROKER_PASSWORD","username":"BROKER_USERNAME"},"name":null}` | Provide connection details alternatively via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys | | messageBroker.password | string | `nil` | Broker password | | messageBroker.url | string | `nil` | Broker URL formatted as per: https://activemq.apache.org/failover-transport-reference | @@ -92,13 +82,14 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b | resources.limits.memory | string | `"2048Mi"` | | | resources.requests.cpu | string | `"0.5"` | | | resources.requests.memory | string | `"256Mi"` | | -| searchIndex | object | `{"existingSecretName":null,"host":null,"password":null,"port":null,"protocol":null,"user":null}` | Overrides .Values.global.elasticsearch | -| searchIndex.existingSecretName | string | `nil` | Alternatively, provide connection details via an an existing secret that contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys | -| searchIndex.host | string | `nil` | The host where service is available | -| searchIndex.password | string | `nil` | The password required to access the service, if any | -| searchIndex.port | string | `nil` | The port where service is available | -| searchIndex.protocol | string | `nil` | Valid values are http or https | -| searchIndex.user | string | `nil` | The username required to access the service, if any | +| search.existingConfigMap.keys.url | string | `"SEARCH_URL"` | Key within the configmap holding the URL of the search/indexing service | +| search.existingConfigMap.name | string | `nil` | Alternatively, provide search/indexing service connection details via an existing configmap | +| search.existingSecret.keys.password | string | `"SEARCH_PASSWORD"` | Key within the secret that holds the search/indexing password | +| search.existingSecret.keys.username | string | `"SEARCH_USERNAME"` | Key within the secret that holds the search/indexing username | +| search.existingSecret.name | string | `nil` | Alternatively, provide search/indexing credentials via an existing secret | +| search.password | string | `nil` | The password required to access the search/indexing service, if any | +| search.url | string | `nil` | The URL where the search/indexing service is available | +| search.user | string | `nil` | The username required to access the search/indexing service, if any | | securityContext | object | `{}` | | | serviceAccount.annotations | object | `{}` | | | serviceAccount.create | bool | `true` | | diff --git a/charts/alfresco-search-enterprise/ci/default-values.yaml b/charts/alfresco-search-enterprise/ci/default-values.yaml index 2467791d..7508ae78 100644 --- a/charts/alfresco-search-enterprise/ci/default-values.yaml +++ b/charts/alfresco-search-enterprise/ci/default-values.yaml @@ -15,8 +15,11 @@ resources: limits: cpu: "1" memory: "1Gi" +search: + url: http://elasticsearch-master:9200 elasticsearch: - enabled: true + replicas: 1 + clusterHealthCheckParams: "wait_for_status=yellow&timeout=1s" esJavaOpts: "-Xmx512m -Xms512m" resources: requests: diff --git a/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl b/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl index c1687746..ff3ff2d0 100644 --- a/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl +++ b/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl @@ -1,27 +1,38 @@ -{{- define "alfresco-search-enterprise.searchIndexExistingSecretName" -}} -{{- coalesce .Values.searchIndex.existingSecretName .Values.global.elasticsearch.existingSecretName (printf "%s-elasticsearch-secret" (include "alfresco-search-enterprise.fullname" .)) }} -{{- end -}} +{{/* -{{- define "alfresco-search-enterprise.config.spring" -}} -{{- if .Values.elasticsearch.enabled -}} - SPRING_ELASTICSEARCH_REST_URIS: "{{ .Values.elasticsearch.protocol }}://{{ .Values.elasticsearch.clusterName }}-{{ .Values.elasticsearch.nodeGroup }}:{{ .Values.elasticsearch.httpPort }}" -{{- else }} - {{- if and (not .Values.global.elasticsearch.host) (not .Values.searchIndex.host) }} - {{- fail "Please provide external elasticsearch connection details as values under .global.elasticsearch or .searchIndex or enable the embedded elasticsearch via .elasticsearch.enabled" }} - {{- end -}} - SPRING_ELASTICSEARCH_REST_URIS: "{{ .Values.searchIndex.protocol | default .Values.global.elasticsearch.protocol }}://{{ .Values.searchIndex.host | default .Values.global.elasticsearch.host }}:{{ .Values.searchIndex.port | default .Values.global.elasticsearch.port }}" -{{- end -}} +Usage: include "alfresco-search-enterprise.config.spring.es.env" $ + +*/}} +{{- define "alfresco-search-enterprise.config.spring.es.env" -}} +{{- $esCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default .Chart.Name) "es")) "Chart" .Chart "Release" .Release }} +{{- with .Values.search }} +{{- $esCm := coalesce .existingConfigMap.name (include "alfresco-search-enterprise.fullname" $esCtx) }} +- name: SPRING_ELASTICSEARCH_REST_URIS + valueFrom: + configMapKeyRef: + name: {{ $esCm }} + key: {{ .existingConfigMap.keys.url }} +{{- end }} {{- end -}} +{{/* + +Usage: include "alfresco-search-enterprise.config.spring.envCredentials" $ + +*/}} {{- define "alfresco-search-enterprise.config.spring.envCredentials" -}} +{{- $esCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default .Chart.Name) "es")) "Chart" .Chart "Release" .Release }} +{{- with .Values.search }} +{{- $esSecret := coalesce .existingSecret.name (include "alfresco-search-enterprise.fullname" $esCtx) }} - name: SPRING_ELASTICSEARCH_REST_USERNAME valueFrom: secretKeyRef: - name: {{ template "alfresco-search-enterprise.searchIndexExistingSecretName" $ }} - key: ELASTICSEARCH_USERNAME + name: {{ $esSecret }} + key: {{ .existingSecret.keys.username }} - name: SPRING_ELASTICSEARCH_REST_PASSWORD valueFrom: secretKeyRef: - name: {{ template "alfresco-search-enterprise.searchIndexExistingSecretName" $ }} - key: ELASTICSEARCH_PASSWORD + name: {{ $esSecret }} + key: {{ .existingSecret.keys.password }} +{{- end }} {{- end -}} diff --git a/charts/alfresco-search-enterprise/templates/configmap-elasticsearch.yaml b/charts/alfresco-search-enterprise/templates/configmap-elasticsearch.yaml index 8f4b242f..4636ac26 100644 --- a/charts/alfresco-search-enterprise/templates/configmap-elasticsearch.yaml +++ b/charts/alfresco-search-enterprise/templates/configmap-elasticsearch.yaml @@ -1,8 +1,17 @@ +{{- with .Values.search }} +{{- if not .existingConfigMap.name }} apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "alfresco-search-enterprise.fullname" . }}-es + {{- $ctx := dict "Values" (dict "nameOverride" (printf "%s-%s" ($.Values.nameOverride | default $.Chart.Name) "es")) "Chart" $.Chart "Release" $.Release }} + name: {{ template "alfresco-search-enterprise.fullname" $ctx }} labels: {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} data: - {{ template "alfresco-search-enterprise.config.spring" . }} + {{- $reqMsg := "Please provide elasticsearch connection details as .search.url values or using an .search.existingConfigMap." }} + {{- $esProtocol := required $reqMsg (include "alfresco-common.url.scheme" .url) }} + {{- $esHost := required $reqMsg (include "alfresco-common.url.host" .url) }} + {{- $esPort := required $reqMsg (include "alfresco-common.url.port" .url) }} + SEARCH_URL: {{ printf "%s://%s:%v" $esProtocol $esHost $esPort }} +{{- end }} +{{- end }} diff --git a/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml b/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml index 937065e5..27e28f31 100644 --- a/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml +++ b/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml @@ -35,16 +35,13 @@ spec : {{ index $.Values "liveIndexing" (printf "%s" $serviceName) "image" "tag" }}" imagePullPolicy: {{ index $.Values "liveIndexing" (printf "%s" $serviceName) "image" "pullPolicy" }} {{- include "alfresco-common.component-security-context" .Values | indent 8 }} - envFrom: - - configMapRef: - name: {{ template "alfresco-search-enterprise.fullname" $ }}-es env: {{- include "alfresco-search-enterprise.activemq.secret.env" $ | nindent 12 }} {{- include "alfresco-search-enterprise.activemq.cm.env" $ | nindent 12 }} {{- include "alfresco-common.spring.activemq.env" . | nindent 12 }} {{- include "alfresco-search-enterprise.config.spring.envCredentials" $ | nindent 12 }} + {{- include "alfresco-search-enterprise.config.spring.es.env" $ | nindent 12 }} {{- include "alfresco-search-enterprise.env" $ | nindent 12 }} - {{- range $key, $val := $.Values.liveIndexing.environment }} {{- $atsCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" ($.Values.nameOverride | default $.Chart.Name) "ats")) "Chart" $.Chart "Release" $.Release }} {{- $ats_cm := coalesce $.Values.ats.existingConfigMap.name (include "alfresco-search-enterprise.fullname" $atsCtx) }} - name: ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL @@ -57,6 +54,7 @@ spec : configMapKeyRef: name: {{ $ats_cm }} key: {{ $.Values.ats.existingConfigMap.keys.sfs_url }} + {{- range $key, $val := $.Values.liveIndexing.environment }} - name: {{ $key }} value: {{ $val | quote }} {{- end }} diff --git a/charts/alfresco-search-enterprise/templates/reindexing-job.yaml b/charts/alfresco-search-enterprise/templates/reindexing-job.yaml index b3e23af6..59209bfe 100644 --- a/charts/alfresco-search-enterprise/templates/reindexing-job.yaml +++ b/charts/alfresco-search-enterprise/templates/reindexing-job.yaml @@ -25,9 +25,6 @@ spec: imagePullPolicy: {{ .Values.reindexing.image.pullPolicy }} {{- include "alfresco-common.component-security-context" .Values | indent 8 }} resources: {{- toYaml .Values.reindexing.resources | nindent 12 }} - envFrom: - - configMapRef: - name: {{ template "alfresco-search-enterprise.fullname" . }}-es env: {{- $dbCtx := dict "Values" (dict "nameOverride" "alfresco-database") "Chart" .Chart "Release" .Release }} {{- $dbFullName := (include "alfresco-search-enterprise.fullname" $dbCtx) }} @@ -35,6 +32,7 @@ spec: {{- include "alfresco-search-enterprise.activemq.secret.env" . | nindent 12 }} {{- include "alfresco-search-enterprise.activemq.cm.env" . | nindent 12 }} {{- include "alfresco-common.spring.activemq.env" . | nindent 12 }} + {{- include "alfresco-search-enterprise.config.spring.es.env" $ | nindent 12 }} {{- include "alfresco-search-enterprise.config.spring.envCredentials" . | nindent 12 }} - name: ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL valueFrom: diff --git a/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml b/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml index 43e0e1b1..98f25cbc 100644 --- a/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml +++ b/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml @@ -1,12 +1,15 @@ -{{- if and (not .Values.global.elasticsearch.existingSecretName) (not .Values.searchIndex.existingSecretName) }} +{{- with .Values.search }} +{{- if not .existingSecret.name }} apiVersion: v1 kind: Secret metadata: - name: {{ template "alfresco-search-enterprise.fullname" . }}-elasticsearch-secret + {{- $ctx := dict "Values" (dict "nameOverride" (printf "%s-%s" ($.Values.nameOverride | default $.Chart.Name) "es")) "Chart" $.Chart "Release" $.Release }} + name: {{ template "alfresco-search-enterprise.fullname" $ctx }} labels: {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} type: Opaque data: - ELASTICSEARCH_USERNAME: {{ .Values.searchIndex.user | default .Values.global.elasticsearch.user | default "" | b64enc | quote }} - ELASTICSEARCH_PASSWORD: {{ .Values.searchIndex.password | default .Values.global.elasticsearch.password | default "" | b64enc | quote }} + SEARCH_USERNAME: {{ .username | default "" | b64enc | quote }} + SEARCH_PASSWORD: {{ .password | default "" | b64enc | quote }} +{{- end }} {{- end }} diff --git a/charts/alfresco-search-enterprise/tests/liveindexing-deployment_test.yaml b/charts/alfresco-search-enterprise/tests/liveindexing-deployment_test.yaml index 605b8f5b..a3a29a68 100644 --- a/charts/alfresco-search-enterprise/tests/liveindexing-deployment_test.yaml +++ b/charts/alfresco-search-enterprise/tests/liveindexing-deployment_test.yaml @@ -10,21 +10,14 @@ templates: tests: - it: | Render elasticsearch Liveindexing configmap, - using global config to ensure it overrides default values. + using provided values and check deployment has appropriate defaults values: &testvalues - values/embedded-charts-values.yaml - set: - global: - elasticsearch: - host: someglobally.used.host - user: admin - protocol: https - port: 1443 template: liveindexing-deployment.yaml asserts: - equal: - path: data.SPRING_ELASTICSEARCH_REST_URIS - value: https://someglobally.used.host:1443 + path: data.SEARCH_URL + value: http://elasticsearch-master:9200 template: configmap-elasticsearch.yaml - contains: path: spec.template.spec.containers[0].env @@ -34,16 +27,62 @@ tests: configMapKeyRef: name: RELEASE-NAME-alfresco-search-enterprise-mq key: BROKER_URL + - contains: + path: spec.template.spec.containers[0].env + content: + name: SPRING_ELASTICSEARCH_REST_URIS + valueFrom: + configMapKeyRef: + name: RELEASE-NAME-alfresco-search-enterprise-es + key: SEARCH_URL + - contains: + path: spec.template.spec.containers[0].env + content: + name: SPRING_ELASTICSEARCH_REST_USERNAME + valueFrom: + secretKeyRef: + name: RELEASE-NAME-alfresco-search-enterprise-es + key: SEARCH_USERNAME + - contains: + path: spec.template.spec.containers[0].env + content: + name: SPRING_ELASTICSEARCH_REST_PASSWORD + valueFrom: + secretKeyRef: + name: RELEASE-NAME-alfresco-search-enterprise-es + key: SEARCH_PASSWORD + - contains: + path: spec.template.spec.containers[0].env + content: + name: ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL + valueFrom: + configMapKeyRef: + name: RELEASE-NAME-alfresco-search-enterprise-ats + key: ATS_URL + - contains: + path: spec.template.spec.containers[0].env + content: + name: ALFRESCO_SHAREDFILESTORE_BASEURL + valueFrom: + configMapKeyRef: + name: RELEASE-NAME-alfresco-search-enterprise-ats + key: SFS_URL - it: | Render default mainfest with embedded elasticsearch and pre-existing secret values: *testvalues template: liveindexing-deployment.yaml set: - elasticsearch: - enabled: true - searchIndex: - existingSecretName: nooneknows + search: + existingConfigMap: + name: escm + keys: + url: ESURL + existingSecret: + name: nooneknows + keys: + username: ESUSER + password: ESPASS messageBroker: existingConfigMap: name: mymqcm @@ -66,10 +105,14 @@ tests: path: data.SFS_URL value: http://sfs/alfresco/api/-default-/private/sfs/versions/1/file/ template: configmap-ats.yaml - - equal: - path: data.SPRING_ELASTICSEARCH_REST_URIS - value: http://elasticsearch-master:9200 - template: configmap-elasticsearch.yaml + - contains: + path: spec.template.spec.containers[0].env + content: + name: SPRING_ELASTICSEARCH_REST_URIS + valueFrom: + configMapKeyRef: + name: escm + key: ESURL - contains: path: spec.template.spec.containers[0].env content: @@ -77,7 +120,7 @@ tests: valueFrom: secretKeyRef: name: nooneknows - key: ELASTICSEARCH_USERNAME + key: ESUSER - contains: path: spec.template.spec.containers[0].env content: @@ -85,7 +128,7 @@ tests: valueFrom: secretKeyRef: name: nooneknows - key: ELASTICSEARCH_PASSWORD + key: ESPASS - equal: path: spec.template.spec.containers[0].resources value: diff --git a/charts/alfresco-search-enterprise/tests/reindexing-job_test.yaml b/charts/alfresco-search-enterprise/tests/reindexing-job_test.yaml index df977515..6de4bb0f 100644 --- a/charts/alfresco-search-enterprise/tests/reindexing-job_test.yaml +++ b/charts/alfresco-search-enterprise/tests/reindexing-job_test.yaml @@ -122,16 +122,16 @@ tests: name: SPRING_ELASTICSEARCH_REST_USERNAME valueFrom: secretKeyRef: - name: RELEASE-NAME-alfresco-search-enterprise-elasticsearch-secret - key: ELASTICSEARCH_USERNAME + name: RELEASE-NAME-alfresco-search-enterprise-es + key: SEARCH_USERNAME - contains: path: spec.template.spec.containers[0].env content: name: SPRING_ELASTICSEARCH_REST_PASSWORD valueFrom: secretKeyRef: - name: RELEASE-NAME-alfresco-search-enterprise-elasticsearch-secret - key: ELASTICSEARCH_PASSWORD + name: RELEASE-NAME-alfresco-search-enterprise-es + key: SEARCH_PASSWORD - it: should not be present when disabled set: diff --git a/charts/alfresco-search-enterprise/tests/secret-elasticsearch_test.yaml b/charts/alfresco-search-enterprise/tests/secret-elasticsearch_test.yaml index 56e9dbc1..0b21e8d9 100644 --- a/charts/alfresco-search-enterprise/tests/secret-elasticsearch_test.yaml +++ b/charts/alfresco-search-enterprise/tests/secret-elasticsearch_test.yaml @@ -4,35 +4,32 @@ templates: - secret-elasticsearch.yaml tests: - it: should have empty credentials as default - set: - global.elasticsearch: - user: null - password: null asserts: - equal: - path: data.ELASTICSEARCH_USERNAME + path: data.SEARCH_USERNAME value: "" - equal: - path: data.ELASTICSEARCH_PASSWORD + path: data.SEARCH_PASSWORD value: "" - - it: should have credentials populated when global credentials are set + - it: should have credentials populated when credentials are set set: - global.elasticsearch: - user: admin + search: + username: admin password: letmein asserts: - equal: - path: data.ELASTICSEARCH_USERNAME + path: data.SEARCH_USERNAME value: YWRtaW4= - equal: - path: data.ELASTICSEARCH_PASSWORD + path: data.SEARCH_PASSWORD value: bGV0bWVpbg== - - it: should not have a secret when global existingSecretName is set + - it: should not have a secret when existingSecret is set set: - global.elasticsearch: - existingSecretName: whatever + search: + existingSecret: + name: whatever asserts: - hasDocuments: count: 0 diff --git a/charts/alfresco-search-enterprise/tests/values/embedded-charts-values.yaml b/charts/alfresco-search-enterprise/tests/values/embedded-charts-values.yaml index e630b951..12e0f9ad 100644 --- a/charts/alfresco-search-enterprise/tests/values/embedded-charts-values.yaml +++ b/charts/alfresco-search-enterprise/tests/values/embedded-charts-values.yaml @@ -1,5 +1,7 @@ messageBroker: url: tcp://localhost:61616 +search: + url: http://elasticsearch-master:9200 ats: transform_url: http://transform sfs_url: http://sfs diff --git a/charts/alfresco-search-enterprise/values.yaml b/charts/alfresco-search-enterprise/values.yaml index 4c4f7522..fd13ad82 100644 --- a/charts/alfresco-search-enterprise/values.yaml +++ b/charts/alfresco-search-enterprise/values.yaml @@ -132,9 +132,9 @@ messageBroker: username: null # -- Broker password password: null - # -- Alternatively, provide message broker connection details via an existing - # configmap existingConfigMap: + # -- Alternatively, provide message broker connection details via an existing + # configmap name: null keys: # -- Key within the configmap holding the URL of the message broker @@ -146,43 +146,30 @@ messageBroker: keys: username: BROKER_USERNAME password: BROKER_PASSWORD -# -- Overrides .Values.global.elasticsearch -searchIndex: - # -- The host where service is available - host: null - # -- The port where service is available - port: null - # -- Valid values are http or https - protocol: null - # -- The username required to access the service, if any +search: + # -- The URL where the search/indexing service is available + url: null + # -- The username required to access the search/indexing service, if any user: null - # -- The password required to access the service, if any + # -- The password required to access the search/indexing service, if any password: null - # -- Alternatively, provide connection details via an an existing secret that - # contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys - existingSecretName: null + existingConfigMap: + # -- Alternatively, provide search/indexing service connection details via + # an existing configmap + name: null + keys: + # -- Key within the configmap holding the URL of the search/indexing service + url: SEARCH_URL + existingSecret: + # -- Alternatively, provide search/indexing credentials via an existing secret + name: null + keys: + # -- Key within the secret that holds the search/indexing username + username: SEARCH_USERNAME + # -- Key within the secret that holds the search/indexing password + password: SEARCH_PASSWORD global: alfrescoRegistryPullSecrets: quay-registry-secret - # -- Shared connections details for Elasticsearch/Opensearch cluster - elasticsearch: - # -- The host where service is available - host: null - # -- The port where service is available - port: null - # -- Valid values are http or https - protocol: null - # -- The username required to access the service, if any - user: null - # -- The password required to access the service, if any - password: null - # -- Alternatively, provide connection details via an existing secret that - # contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys - existingSecretName: null -elasticsearch: - # -- Enable embedded elasticsearch - useful when using this chart in standalone - enabled: false - replicas: 1 - clusterHealthCheckParams: "wait_for_status=yellow&timeout=1s" tags: # -- A chart tag used for Hyland's CI purpose. Do not set it to true.