diff --git a/helm/alfresco-content-services/Chart.lock b/helm/alfresco-content-services/Chart.lock index 5f1d5feb0..6693ee708 100644 --- a/helm/alfresco-content-services/Chart.lock +++ b/helm/alfresco-content-services/Chart.lock @@ -1,7 +1,7 @@ dependencies: - name: alfresco-common repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.0.0 + version: 3.1.0 - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts version: 12.8.5 @@ -28,7 +28,7 @@ dependencies: version: 4.5.1 - name: alfresco-search-enterprise repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.0.3 + version: 3.1.0-alpha.1 - name: alfresco-connector-msteams repository: https://alfresco.github.io/alfresco-helm-charts/ version: 0.2.0 @@ -40,9 +40,9 @@ dependencies: version: 0.4.0 - name: alfresco-ai-transformer repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 0.4.1 + version: 1.0.0-alpha.3 - name: elasticsearch repository: https://helm.elastic.co version: 7.17.3 -digest: sha256:888e553af46ee10156a5588a7042b5fc5986eb738c1c93671b3a0f6beda9507b -generated: "2024-01-05T10:48:43.366192+01:00" +digest: sha256:0417bcf55867d69215eaffcd4ed654ea6997fc9446001d5e043aed71ee5ef4c1 +generated: "2024-01-08T20:21:57.262673+01:00" diff --git a/helm/alfresco-content-services/Chart.yaml b/helm/alfresco-content-services/Chart.yaml index 507dc08b9..5474dcc72 100644 --- a/helm/alfresco-content-services/Chart.yaml +++ b/helm/alfresco-content-services/Chart.yaml @@ -17,7 +17,7 @@ sources: - https://github.com/Alfresco/acs-deployment dependencies: - name: alfresco-common - version: 3.0.0 + version: 3.1.0 repository: https://alfresco.github.io/alfresco-helm-charts/ - name: postgresql version: 12.8.5 @@ -56,7 +56,7 @@ dependencies: version: 4.5.1 condition: alfresco-sync-service.enabled - name: alfresco-search-enterprise - version: 3.0.3 + version: 3.1.0-alpha.1 repository: https://alfresco.github.io/alfresco-helm-charts/ condition: alfresco-search-enterprise.enabled - name: alfresco-connector-msteams @@ -73,7 +73,7 @@ dependencies: repository: https://alfresco.github.io/alfresco-helm-charts/ condition: alfresco-connector-ms365.enabled - name: alfresco-ai-transformer - version: 0.4.1 + version: 1.0.0-alpha.3 repository: https://alfresco.github.io/alfresco-helm-charts/ condition: alfresco-ai-transformer.enabled - name: elasticsearch diff --git a/helm/alfresco-content-services/README.md b/helm/alfresco-content-services/README.md index 2b7f73231..fa1e15399 100644 --- a/helm/alfresco-content-services/README.md +++ b/helm/alfresco-content-services/README.md @@ -19,12 +19,12 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b | https://activiti.github.io/activiti-cloud-helm-charts | alfresco-control-center(common) | 8.0.0 | | https://activiti.github.io/activiti-cloud-helm-charts | alfresco-digital-workspace(common) | 8.0.0 | | https://alfresco.github.io/alfresco-helm-charts/ | activemq | 3.4.1 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-ai-transformer | 0.4.1 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 3.0.0 | +| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-ai-transformer | 1.0.0-alpha.3 | +| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 3.1.0 | | https://alfresco.github.io/alfresco-helm-charts/ | alfresco-connector-ms365 | 0.4.0 | | https://alfresco.github.io/alfresco-helm-charts/ | alfresco-connector-msteams | 0.2.0 | | https://alfresco.github.io/alfresco-helm-charts/ | alfresco-repository | 0.1.2 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-search-enterprise | 3.0.3 | +| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-search-enterprise | 3.1.0-alpha.1 | | https://alfresco.github.io/alfresco-helm-charts/ | alfresco-search(alfresco-search-service) | 2.0.0 | | https://alfresco.github.io/alfresco-helm-charts/ | share(alfresco-share) | 0.3.0 | | https://alfresco.github.io/alfresco-helm-charts/ | alfresco-sync-service | 4.5.1 | @@ -43,10 +43,13 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b | activemq.existingSecretName | string | `nil` | | | activemq.nameOverride | string | `"activemq"` | | | activemq.nodeSelector | object | `{}` | Possibility to choose Node for pod, with a key-value pair label e.g {"kubernetes.io/hostname": multinode-demo-m02} | -| alfresco-ai-transformer.enabled | bool | `false` | | +| alfresco-ai-transformer.enabled | bool | `false` | toggle deploying Alfresco ai transformer for more details about configuration check https://github.com/Alfresco/alfresco-helm-charts/tree/main/charts/alfresco-ai-transformer | | alfresco-ai-transformer.image.repository | string | `"quay.io/alfresco/alfresco-ai-docker-engine"` | | | alfresco-ai-transformer.image.tag | string | `"3.0.1"` | | -| alfresco-ai-transformer.messageBroker.existingSecretName | string | `"acs-alfresco-cs-brokersecret"` | | +| alfresco-ai-transformer.messageBroker.existingConfigMap.name | string | `"alfresco-infrastructure"` | Name of the configmap which holds the message broker URL | +| alfresco-ai-transformer.messageBroker.existingSecret.name | string | `"acs-alfresco-cs-brokersecret"` | Name of the configmap which holds the message broker credentials | +| alfresco-ai-transformer.sfs.existingConfigMap.keys.url | string | `"SFS_URL"` | Name of the key within the configmap which holds the sfs url | +| alfresco-ai-transformer.sfs.existingConfigMap.name | string | `"alfresco-infrastructure"` | Name of the configmap which holds the ATS shared filestore URL | | alfresco-connector-ms365.enabled | bool | `false` | Enable/Disable Alfresco Content Connector for Microsoft 365 | | alfresco-connector-ms365.image.repository | string | `"quay.io/alfresco/alfresco-ooi-service"` | | | alfresco-connector-ms365.image.tag | string | `"2.0.0"` | | diff --git a/helm/alfresco-content-services/templates/_helpers-message-broker.tpl b/helm/alfresco-content-services/templates/_helpers-message-broker.tpl index 59e7487b9..f9a9d2d16 100644 --- a/helm/alfresco-content-services/templates/_helpers-message-broker.tpl +++ b/helm/alfresco-content-services/templates/_helpers-message-broker.tpl @@ -5,10 +5,12 @@ Usage: include "alfresco-content-services.mq.url" $ */}} {{- define "alfresco-content-services.mq.url" -}} - {{- if .Values.activemq.enabled }} + {{- if .Values.messageBroker.url }} + {{- .Values.messageBroker.url }} + {{- else if .Values.activemq.enabled }} {{- $mqCtx := dict "Values" .Values.activemq "Chart" .Chart "Release" .Release }} {{- printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "activemq.fullname" $mqCtx) }} {{- else }} - {{- required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url }} + {{- fail "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" }} {{- end }} {{- end }} diff --git a/helm/alfresco-content-services/templates/config-infrastructure.yaml b/helm/alfresco-content-services/templates/config-infrastructure.yaml index c424d8c3a..d8959f9de 100644 --- a/helm/alfresco-content-services/templates/config-infrastructure.yaml +++ b/helm/alfresco-content-services/templates/config-infrastructure.yaml @@ -7,7 +7,6 @@ metadata: {{- include "alfresco-content-services.labels" . | nindent 4 }} data: {{- $repoCtx := dict "Values" (index .Values "alfresco-repository") "Chart" .Chart "Release" .Release }} - {{- $atsCtx := dict "Values" (index .Values "alfresco-transform-service") "Chart" $.Chart "Release" $.Release }} {{- $repo_svc_name := include "alfresco-repository.fullname" $repoCtx }} {{- $repo_svc_port := index .Values "alfresco-repository" "service" "port" | default 80 }} repo_svc_name: {{ $repo_svc_name }} @@ -52,13 +51,17 @@ data: {{- end }} {{- end }} SEARCH_FLAVOR: {{ template "alfresco-content-services.search.flavor" . }} - {{- if index .Values "alfresco-search-enterprise" "enabled" }} - {{- if index .Values "alfresco-transform-service" "enabled" }} - {{- $ats_baseurl := (printf "http://%s" (include "alfresco-transform-service.deployment-transform-router.name" $atsCtx)) }} - {{- $sfs_baseurl := (printf "http://%s" (include "alfresco-transform-service.deployment-filestore.name" $atsCtx)) }} + {{- with (index .Values "alfresco-transform-service") }} + {{- $atsCtx := dict "Values" . "Chart" $.Chart "Release" $.Release }} + {{- if and .enabled .filestore.enabled .transformrouter.enabled }} + SFS_URL: {{ template "alfresco-common.sfs.fullurl" (printf "http://%s" (include "alfresco-transform-service.deployment-filestore.name" $atsCtx)) }} + {{- $ats_baseurl := (printf "http://%s" (include "alfresco-transform-service.deployment-transform-router.name" $atsCtx)) }} + {{- if index $.Values "alfresco-search-enterprise" "enabled" }} {{- include "alfresco-search-enterprise.ats.fullurl" $ats_baseurl | nindent 2 }} - {{- include "alfresco-search-enterprise.sfs.fullurl" $sfs_baseurl | nindent 2 }} - {{- else }} - {{- fail "Alfresco Search Enterprise has been enabled but no Transformation service has been provided" }} {{- end }} + {{- else if index $.Values "alfresco-search-enterprise" "enabled" }} + {{- fail "Alfresco Search Enterprise has been enabled but Transformation service is not available" }} + {{- else if index $.Values "alfresco-ai-transformer" "enabled" }} + {{- fail "Alfresco Intelligence service has been enabled but Transformation service is not available" }} + {{- end }} {{- end }} diff --git a/helm/alfresco-content-services/tests/config-infra_test.yaml b/helm/alfresco-content-services/tests/config-infra_test.yaml new file mode 100644 index 000000000..4417b17dc --- /dev/null +++ b/helm/alfresco-content-services/tests/config-infra_test.yaml @@ -0,0 +1,140 @@ +--- +suite: test config-infrastructure manifest +templates: + - config-infrastructure.yaml +tests: + - it: should not render minimal infra + values: &testvalues + - values/test_values.yaml + set: + alfresco-search.enabled: false + alfresco-search-enterprise.enabled: false + alfresco-transform-service.enabled: false + asserts: + - notExists: + path: data.SEARCH_SECURECOMMS + - notExists: + path: data.SEARCH_HOST + - notExists: + path: data.SEARCH_PORT + - notExists: + path: data.SEARCH_URL + - notExists: + path: data.SOLR_BASE_URL + - equal: + path: data.SEARCH_FLAVOR + value: noindex + - notExists: + path: data.SFS_URL + - notExists: + path: data.ATS_URL + + - it: should render the default infra (solr) + values: *testvalues + asserts: + - equal: + path: data.BROKER_URL + value: failover:(nio://RELEASE-NAME-activemq-broker:61616)?timeout=3000&jms.useCompression=true + - equal: + path: data.DATABASE_URL + value: jdbc:postgresql://RELEASE-NAME-postgresql-acs:5432/alfresco + - equal: + path: data.DATABASE_DRIVER + value: org.postgresql.Driver + - equal: + path: data.SEARCH_SECURECOMMS + value: secret + - equal: + path: data.SEARCH_HOST + value: RELEASE-NAME-alfresco-search-solr + - equal: + path: data.SEARCH_PORT + value: "80" + - equal: + path: data.SEARCH_URL + value: http://RELEASE-NAME-alfresco-search-solr/solr + - equal: + path: data.SOLR_BASE_URL + value: /solr + - equal: + path: data.SEARCH_FLAVOR + value: solr6 + - equal: + path: data.SFS_URL + value: >- + http://RELEASE-NAME-filestore/alfresco/api/-default-/private/sfs/versions/1/file/ + - notExists: + path: data.ATS_URL + + - it: should render a custom infra (elasticsearch) + values: *testvalues + set: + alfresco-search.enabled: false + alfresco-search-enterprise.enabled: true + elasticsearch.enabled: false + global.search.url: https://mydomain.opensearch.domain.tld + global.search.flavor: elasticsearch + global.search.securecomms: none + # commented to test url has precedence + #postgresql.enabled: false + database.url: jdbc:mariadb://rdbms.domain.local/alfdb + # commented to test url has precedence + #activemq.enabled: false + messageBroker.url: >- + failover:(ssl://mq1.dc1.infra.local,ssl://mq2.dc2.infra.local)?timeout=3000&jms.useCompression=true + asserts: + - equal: + path: data.BROKER_URL + value: failover:(ssl://mq1.dc1.infra.local,ssl://mq2.dc2.infra.local)?timeout=3000&jms.useCompression=true + - equal: + path: data.DATABASE_URL + value: jdbc:mariadb://rdbms.domain.local/alfdb + - equal: + path: data.DATABASE_DRIVER + value: org.mariadb.jdbc.Driver + - equal: + path: data.SEARCH_SECURECOMMS + value: none + - equal: + path: data.SEARCH_HOST + value: mydomain.opensearch.domain.tld + - equal: + path: data.SEARCH_PORT + value: "443" + - equal: + path: data.SEARCH_URL + value: https://mydomain.opensearch.domain.tld + - notExists: + path: data.SOLR_BASE_URL + - equal: + path: data.SEARCH_FLAVOR + value: elasticsearch + - equal: + path: data.SFS_URL + value: >- + http://RELEASE-NAME-filestore/alfresco/api/-default-/private/sfs/versions/1/file/ + - equal: + path: data.ATS_URL + value: >- + http://RELEASE-NAME-transform-router/transform/config + + - it: should fail rendering charts with search enterprise without ATS enterprise + values: *testvalues + set: + elasticsearch.enabled: true + alfresco-search-enterprise.enabled: true + alfresco-transform-service.transformrouter.enabled: false + asserts: + - failedTemplate: + errorMEssage: >- + Alfresco Search Enterprise has been enabled but Transformation service is not available + - it: should fail rendering charts for enterprise components without ATS enterprise + values: *testvalues + set: + elasticsearch.enabled: true + alfresco-ai-transformer.enabled: true + alfresco-transform-service.filestore.enabled: false + asserts: + - failedTemplate: + errorMEssage: >- + Alfresco Intelligence service has been enabled but Transformation service is not available diff --git a/helm/alfresco-content-services/values.yaml b/helm/alfresco-content-services/values.yaml index e1444f1b1..1dc32ff85 100644 --- a/helm/alfresco-content-services/values.yaml +++ b/helm/alfresco-content-services/values.yaml @@ -474,20 +474,27 @@ alfresco-sync-service: repository: nameOverride: alfresco-repository port: 80 - # -- toggle deploying Alfresco ai transformer alfresco-ai-transformer: + # -- toggle deploying Alfresco ai transformer for more details about configuration check + # https://github.com/Alfresco/alfresco-helm-charts/tree/main/charts/alfresco-ai-transformer enabled: false - messageBroker: - existingSecretName: *acs_messageBroker_secretName image: repository: quay.io/alfresco/alfresco-ai-docker-engine tag: 3.0.1 -# aws: -# accessKey: -# secretAccessKey: -# region: -# s3Bucket: -# comprehendRoleARN: + sfs: + existingConfigMap: + # -- Name of the configmap which holds the ATS shared filestore URL + name: *infrastructure_cmName + keys: + # -- Name of the key within the configmap which holds the sfs url + url: SFS_URL + messageBroker: + existingConfigMap: + # -- Name of the configmap which holds the message broker URL + name: *infrastructure_cmName + existingSecret: + # -- Name of the configmap which holds the message broker credentials + name: *acs_messageBroker_secretName elasticsearch: # -- Enables the embedded elasticsearch cluster enabled: false