From e6dafb2e022e59ee891b1adf04c5bcfb2eb92ea3 Mon Sep 17 00:00:00 2001 From: Alex Chapellon Date: Tue, 4 Jul 2023 11:11:04 +0200 Subject: [PATCH] OPSEXP-1861: add transformation service chart (#64) Co-authored-by: Giovanni Toraldo Co-authored-by: gionn --- .github/workflows/lint-test.yaml | 4 +- charts/alfresco-transform-service/.helmignore | 23 ++ charts/alfresco-transform-service/Chart.lock | 12 + charts/alfresco-transform-service/Chart.yaml | 19 + charts/alfresco-transform-service/README.md | 245 +++++++++++++ .../ci/default-values.yaml | 71 ++++ .../templates/_helpers-label.tpl | 69 ++++ .../templates/_helpers-name.tpl | 69 ++++ .../templates/_helpers-probes.tpl | 20 + .../templates/_helpers-sfs.tpl | 8 + .../templates/_helpers.tpl | 73 ++++ .../templates/config-filestore.yaml | 13 + .../templates/config-imagemagick.yaml | 14 + .../templates/config-libreoffice.yaml | 14 + .../templates/config-pdfrenderer.yaml | 14 + .../templates/config-tika.yaml | 14 + .../templates/config-transform-misc.yaml | 14 + .../templates/config-transform-router.yaml | 27 ++ .../templates/deployment-filestore.yaml | 68 ++++ .../templates/deployment-imagemagick.yaml | 66 ++++ .../templates/deployment-libreoffice.yaml | 66 ++++ .../templates/deployment-pdfrenderer.yaml | 66 ++++ .../templates/deployment-tika.yaml | 66 ++++ .../templates/deployment-transform-misc.yaml | 66 ++++ .../deployment-transform-router.yaml | 77 ++++ .../templates/pvc-filestore.yaml | 3 + .../templates/secret-messagebroker.yaml | 19 + .../templates/svc-filestore.yaml | 16 + .../templates/svc-imagemagick.yaml | 17 + .../templates/svc-libreoffice.yaml | 16 + .../templates/svc-pdfrenderer.yaml | 16 + .../templates/svc-tika.yaml | 16 + .../templates/svc-transform-misc.yaml | 16 + .../templates/svc-transform-router.yaml | 18 + .../tests/components-toggle_test.yaml | 92 +++++ .../tests/config-libreoffice_test.yaml | 26 ++ .../tests/config-tranform-router_test.yaml | 36 ++ .../tests/pv-transform_test.yaml | 74 ++++ .../tests/secrets_test.yaml | 29 ++ .../tests/values/test_values.yaml | 6 + charts/alfresco-transform-service/values.yaml | 345 ++++++++++++++++++ 41 files changed, 1941 insertions(+), 2 deletions(-) create mode 100644 charts/alfresco-transform-service/.helmignore create mode 100644 charts/alfresco-transform-service/Chart.lock create mode 100644 charts/alfresco-transform-service/Chart.yaml create mode 100644 charts/alfresco-transform-service/README.md create mode 100644 charts/alfresco-transform-service/ci/default-values.yaml create mode 100644 charts/alfresco-transform-service/templates/_helpers-label.tpl create mode 100644 charts/alfresco-transform-service/templates/_helpers-name.tpl create mode 100644 charts/alfresco-transform-service/templates/_helpers-probes.tpl create mode 100644 charts/alfresco-transform-service/templates/_helpers-sfs.tpl create mode 100644 charts/alfresco-transform-service/templates/_helpers.tpl create mode 100644 charts/alfresco-transform-service/templates/config-filestore.yaml create mode 100644 charts/alfresco-transform-service/templates/config-imagemagick.yaml create mode 100644 charts/alfresco-transform-service/templates/config-libreoffice.yaml create mode 100644 charts/alfresco-transform-service/templates/config-pdfrenderer.yaml create mode 100644 charts/alfresco-transform-service/templates/config-tika.yaml create mode 100644 charts/alfresco-transform-service/templates/config-transform-misc.yaml create mode 100644 charts/alfresco-transform-service/templates/config-transform-router.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-filestore.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-imagemagick.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-libreoffice.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-tika.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-transform-misc.yaml create mode 100644 charts/alfresco-transform-service/templates/deployment-transform-router.yaml create mode 100644 charts/alfresco-transform-service/templates/pvc-filestore.yaml create mode 100644 charts/alfresco-transform-service/templates/secret-messagebroker.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-filestore.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-imagemagick.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-libreoffice.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-pdfrenderer.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-tika.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-transform-misc.yaml create mode 100644 charts/alfresco-transform-service/templates/svc-transform-router.yaml create mode 100644 charts/alfresco-transform-service/tests/components-toggle_test.yaml create mode 100644 charts/alfresco-transform-service/tests/config-libreoffice_test.yaml create mode 100644 charts/alfresco-transform-service/tests/config-tranform-router_test.yaml create mode 100644 charts/alfresco-transform-service/tests/pv-transform_test.yaml create mode 100644 charts/alfresco-transform-service/tests/secrets_test.yaml create mode 100644 charts/alfresco-transform-service/tests/values/test_values.yaml create mode 100644 charts/alfresco-transform-service/values.yaml diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 8ff5d5b3..a54f573b 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -32,9 +32,9 @@ jobs: - name: Set up Unit Test plugin for Helm env: - HELM_UNITTEST_VERSION: v1.0.16 + HELM_UNITTEST_VERSION: v0.3.3 run: | - helm plugin install https://github.com/vbehar/helm3-unittest --version $HELM_UNITTEST_VERSION + helm plugin install https://github.com/helm-unittest/helm-unittest --version $HELM_UNITTEST_VERSION - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 diff --git a/charts/alfresco-transform-service/.helmignore b/charts/alfresco-transform-service/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/alfresco-transform-service/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/alfresco-transform-service/Chart.lock b/charts/alfresco-transform-service/Chart.lock new file mode 100644 index 00000000..24be1067 --- /dev/null +++ b/charts/alfresco-transform-service/Chart.lock @@ -0,0 +1,12 @@ +dependencies: +- name: alfresco-common + repository: https://alfresco.github.io/alfresco-helm-charts/ + version: 2.0.0 +- name: activemq + repository: https://alfresco.github.io/alfresco-helm-charts/ + version: 3.1.0 +- name: alfresco-ai-transformer + repository: https://alfresco.github.io/alfresco-helm-charts/ + version: 0.1.0-alpha.0 +digest: sha256:d93888d0b6fd50d5b929e79ec4487ef6228c4fd32cc1c14c0a0e261e1eeca45c +generated: "2023-07-03T09:10:55.357184+02:00" diff --git a/charts/alfresco-transform-service/Chart.yaml b/charts/alfresco-transform-service/Chart.yaml new file mode 100644 index 00000000..db5a0e3e --- /dev/null +++ b/charts/alfresco-transform-service/Chart.yaml @@ -0,0 +1,19 @@ +apiVersion: v2 +name: alfresco-transform-service +description: A Helm chart for deploying Alfresco Transform Services +type: application +version: 0.1.0-alpha.0 +appVersion: "3.0.0" +dependencies: + - name: alfresco-common + version: 2.0.0 + repository: https://alfresco.github.io/alfresco-helm-charts/ + - name: activemq + version: 3.1.0 + repository: https://alfresco.github.io/alfresco-helm-charts/ + condition: activemq.enabled + - name: alfresco-ai-transformer + alias: ai + version: 0.1.0-alpha.0 + repository: https://alfresco.github.io/alfresco-helm-charts/ + condition: ai.enabled diff --git a/charts/alfresco-transform-service/README.md b/charts/alfresco-transform-service/README.md new file mode 100644 index 00000000..162726e0 --- /dev/null +++ b/charts/alfresco-transform-service/README.md @@ -0,0 +1,245 @@ +# alfresco-transform-service + +![Version: 0.1.0-alpha.0](https://img.shields.io/badge/Version-0.1.0--alpha.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) + +A Helm chart for deploying Alfresco Transform Services + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://alfresco.github.io/alfresco-helm-charts/ | activemq | 3.1.0 | +| https://alfresco.github.io/alfresco-helm-charts/ | ai(alfresco-ai-transformer) | 0.1.0-alpha.0 | +| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| activemq.adminUser.password | string | `"admin"` | Default password for the embedded broker admin user | +| activemq.adminUser.user | string | `"admin"` | Default username for the embedded broker admin user | +| activemq.enabled | bool | `false` | | +| 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} | +| ai.enabled | bool | `false` | | +| ai.nameOverride | string | `"alfresco-ai"` | | +| filestore.enabled | bool | `true` | | +| filestore.environment."scheduler.cleanup.interval" | string | `"86400000"` | | +| filestore.environment."scheduler.content.age.millis" | string | `"86400000"` | | +| filestore.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| filestore.image.internalPort | int | `8099` | | +| filestore.image.pullPolicy | string | `"IfNotPresent"` | | +| filestore.image.repository | string | `"quay.io/alfresco/alfresco-shared-file-store"` | | +| filestore.image.tag | string | `"3.0.0"` | | +| filestore.initContainer.image.pullPolicy | string | `"IfNotPresent"` | | +| filestore.initContainer.image.repository | string | `"busybox"` | | +| filestore.initContainer.image.tag | string | `"1.35.0"` | | +| filestore.initContainer.resources.limits.cpu | string | `"0.50"` | | +| filestore.initContainer.resources.limits.memory | string | `"10Mi"` | | +| filestore.livenessProbe.initialDelaySeconds | int | `10` | | +| filestore.livenessProbe.livenessPercent | int | `150` | | +| filestore.livenessProbe.livenessSavePeriodSeconds | int | `600` | | +| filestore.livenessProbe.path | string | `"/live"` | | +| filestore.livenessProbe.periodSeconds | int | `20` | | +| filestore.livenessProbe.timeoutSeconds | int | `10` | | +| filestore.nodeSelector | object | `{}` | | +| filestore.persistence.accessModes | list | `["ReadWriteOnce"]` | Specify a storageClass for dynamic provisioning | +| filestore.persistence.data.mountPath | string | `"/tmp/Alfresco"` | | +| filestore.persistence.data.subPath | string | `"alfresco-content-services/filestore-data"` | | +| filestore.persistence.enabled | bool | `true` | Persist filestore data | +| filestore.persistence.existingClaim | string | `nil` | Use pre-provisioned pv through its claim (e.g. static provisionning) | +| filestore.persistence.storageClass | string | `nil` | Bind PVC based on storageClass (e.g. dynamic provisionning) | +| filestore.podSecurityContext.fsGroup | int | `1000` | | +| filestore.podSecurityContext.runAsGroup | int | `1000` | | +| filestore.podSecurityContext.runAsUser | int | `33030` | | +| filestore.readinessProbe.initialDelaySeconds | int | `20` | | +| filestore.readinessProbe.path | string | `"/ready"` | | +| filestore.readinessProbe.periodSeconds | int | `60` | | +| filestore.readinessProbe.timeoutSeconds | int | `10` | | +| filestore.replicaCount | int | `1` | | +| filestore.resources.limits.cpu | string | `"2"` | | +| filestore.resources.limits.memory | string | `"1000Mi"` | | +| filestore.resources.requests.cpu | string | `"0.25"` | | +| filestore.resources.requests.memory | string | `"200Mi"` | | +| filestore.service.externalPort | int | `80` | | +| filestore.service.name | string | `"filestore"` | | +| filestore.service.type | string | `"ClusterIP"` | | +| global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | | +| global.strategy.rollingUpdate.maxSurge | int | `1` | | +| global.strategy.rollingUpdate.maxUnavailable | int | `0` | | +| imagemagick.enabled | bool | `true` | | +| imagemagick.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| imagemagick.image.internalPort | int | `8090` | | +| imagemagick.image.pullPolicy | string | `"IfNotPresent"` | | +| imagemagick.image.repository | string | `"quay.io/alfresco/alfresco-imagemagick"` | | +| imagemagick.image.tag | string | `"4.0.0"` | | +| imagemagick.livenessProbe.initialDelaySeconds | int | `10` | | +| imagemagick.livenessProbe.livenessPercent | int | `150` | | +| imagemagick.livenessProbe.livenessTransformPeriodSeconds | int | `600` | | +| imagemagick.livenessProbe.maxTransformSeconds | int | `900` | | +| imagemagick.livenessProbe.maxTransforms | int | `10000` | | +| imagemagick.livenessProbe.path | string | `"/live"` | | +| imagemagick.livenessProbe.periodSeconds | int | `20` | | +| imagemagick.livenessProbe.timeoutSeconds | int | `10` | | +| imagemagick.nodeSelector | object | `{}` | | +| imagemagick.podSecurityContext.runAsNonRoot | bool | `true` | | +| imagemagick.podSecurityContext.runAsUser | int | `33002` | | +| imagemagick.readinessProbe.initialDelaySeconds | int | `20` | | +| imagemagick.readinessProbe.path | string | `"/ready"` | | +| imagemagick.readinessProbe.periodSeconds | int | `60` | | +| imagemagick.readinessProbe.timeoutSeconds | int | `10` | | +| imagemagick.replicaCount | int | `2` | | +| imagemagick.resources.limits.cpu | string | `"4"` | | +| imagemagick.resources.limits.memory | string | `"1000Mi"` | | +| imagemagick.resources.requests.cpu | string | `"0.5"` | | +| imagemagick.resources.requests.memory | string | `"300Mi"` | | +| imagemagick.service.externalPort | int | `80` | | +| imagemagick.service.name | string | `"imagemagick"` | | +| imagemagick.service.type | string | `"ClusterIP"` | | +| libreoffice.enabled | bool | `true` | | +| libreoffice.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| libreoffice.image.internalPort | int | `8090` | | +| libreoffice.image.pullPolicy | string | `"IfNotPresent"` | | +| libreoffice.image.repository | string | `"quay.io/alfresco/alfresco-libreoffice"` | | +| libreoffice.image.tag | string | `"4.0.0"` | | +| libreoffice.livenessProbe.initialDelaySeconds | int | `10` | | +| libreoffice.livenessProbe.livenessPercent | int | `250` | | +| libreoffice.livenessProbe.livenessTransformPeriodSeconds | int | `600` | | +| libreoffice.livenessProbe.maxTransformSeconds | int | `1800` | | +| libreoffice.livenessProbe.maxTransforms | int | `99999` | | +| libreoffice.livenessProbe.path | string | `"/live"` | | +| libreoffice.livenessProbe.periodSeconds | int | `20` | | +| libreoffice.livenessProbe.timeoutSeconds | int | `10` | | +| libreoffice.nodeSelector | object | `{}` | | +| libreoffice.podSecurityContext.runAsNonRoot | bool | `true` | | +| libreoffice.podSecurityContext.runAsUser | int | `33003` | | +| libreoffice.readinessProbe.initialDelaySeconds | int | `20` | | +| libreoffice.readinessProbe.path | string | `"/ready"` | | +| libreoffice.readinessProbe.periodSeconds | int | `60` | | +| libreoffice.readinessProbe.timeoutSeconds | int | `10` | | +| libreoffice.replicaCount | int | `2` | | +| libreoffice.resources.limits.cpu | string | `"4"` | | +| libreoffice.resources.limits.memory | string | `"1000Mi"` | | +| libreoffice.resources.requests.cpu | string | `"0.5"` | | +| libreoffice.resources.requests.memory | string | `"400Mi"` | | +| libreoffice.service.externalPort | int | `80` | | +| libreoffice.service.name | string | `"libreoffice"` | | +| libreoffice.service.type | string | `"ClusterIP"` | | +| messageBroker | object | `{"existingSecretName":null,"password":null,"secretName":"acs-alfresco-cs-brokersecret","url":null,"user":null}` | external activemq connection setting when activemq.enabled=false | +| messageBroker.existingSecretName | string | `nil` | Alternatively, provide credentials via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys | +| messageBroker.secretName | string | `"acs-alfresco-cs-brokersecret"` | Name of the secret managed by this chart | +| pdfrenderer.enabled | bool | `true` | | +| pdfrenderer.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| pdfrenderer.image.internalPort | int | `8090` | | +| pdfrenderer.image.pullPolicy | string | `"IfNotPresent"` | | +| pdfrenderer.image.repository | string | `"quay.io/alfresco/alfresco-pdf-renderer"` | | +| pdfrenderer.image.tag | string | `"4.0.0"` | | +| pdfrenderer.livenessProbe.initialDelaySeconds | int | `10` | | +| pdfrenderer.livenessProbe.livenessPercent | int | `150` | | +| pdfrenderer.livenessProbe.livenessTransformPeriodSeconds | int | `600` | | +| pdfrenderer.livenessProbe.maxTransformSeconds | int | `1200` | | +| pdfrenderer.livenessProbe.maxTransforms | int | `10000` | | +| pdfrenderer.livenessProbe.path | string | `"/live"` | | +| pdfrenderer.livenessProbe.periodSeconds | int | `20` | | +| pdfrenderer.livenessProbe.timeoutSeconds | int | `10` | | +| pdfrenderer.nodeSelector | object | `{}` | | +| pdfrenderer.podSecurityContext.runAsNonRoot | bool | `true` | | +| pdfrenderer.podSecurityContext.runAsUser | int | `33001` | | +| pdfrenderer.readinessProbe.initialDelaySeconds | int | `20` | | +| pdfrenderer.readinessProbe.path | string | `"/ready"` | | +| pdfrenderer.readinessProbe.periodSeconds | int | `60` | | +| pdfrenderer.readinessProbe.timeoutSeconds | int | `10` | | +| pdfrenderer.replicaCount | int | `2` | | +| pdfrenderer.resources.limits.cpu | string | `"2"` | | +| pdfrenderer.resources.limits.memory | string | `"1000Mi"` | | +| pdfrenderer.resources.requests.cpu | string | `"0.25"` | | +| pdfrenderer.resources.requests.memory | string | `"300Mi"` | | +| pdfrenderer.service.externalPort | int | `80` | | +| pdfrenderer.service.name | string | `"pdfrenderer"` | | +| pdfrenderer.service.type | string | `"ClusterIP"` | | +| tika.enabled | bool | `true` | | +| tika.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| tika.image.internalPort | int | `8090` | | +| tika.image.pullPolicy | string | `"IfNotPresent"` | | +| tika.image.repository | string | `"quay.io/alfresco/alfresco-tika"` | | +| tika.image.tag | string | `"4.0.0"` | | +| tika.livenessProbe.initialDelaySeconds | int | `30` | | +| tika.livenessProbe.livenessPercent | int | `400` | | +| tika.livenessProbe.livenessTransformPeriodSeconds | int | `600` | | +| tika.livenessProbe.maxTransformSeconds | int | `1800` | | +| tika.livenessProbe.maxTransforms | int | `10000` | | +| tika.livenessProbe.path | string | `"/live"` | | +| tika.livenessProbe.periodSeconds | int | `20` | | +| tika.livenessProbe.timeoutSeconds | int | `10` | | +| tika.nodeSelector | object | `{}` | | +| tika.podSecurityContext.runAsNonRoot | bool | `true` | | +| tika.podSecurityContext.runAsUser | int | `33004` | | +| tika.readinessProbe.initialDelaySeconds | int | `30` | | +| tika.readinessProbe.path | string | `"/ready"` | | +| tika.readinessProbe.periodSeconds | int | `60` | | +| tika.readinessProbe.timeoutSeconds | int | `10` | | +| tika.replicaCount | int | `2` | | +| tika.resources.limits.cpu | string | `"2"` | | +| tika.resources.limits.memory | string | `"1000Mi"` | | +| tika.resources.requests.cpu | string | `"0.25"` | | +| tika.resources.requests.memory | string | `"600Mi"` | | +| tika.service.externalPort | int | `80` | | +| tika.service.name | string | `"tika"` | | +| tika.service.type | string | `"ClusterIP"` | | +| transformmisc.enabled | bool | `true` | | +| transformmisc.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| transformmisc.image.internalPort | int | `8090` | | +| transformmisc.image.pullPolicy | string | `"IfNotPresent"` | | +| transformmisc.image.repository | string | `"quay.io/alfresco/alfresco-transform-misc"` | | +| transformmisc.image.tag | string | `"4.0.0"` | | +| transformmisc.livenessProbe.initialDelaySeconds | int | `10` | | +| transformmisc.livenessProbe.livenessPercent | int | `400` | | +| transformmisc.livenessProbe.livenessTransformPeriodSeconds | int | `600` | | +| transformmisc.livenessProbe.maxTransformSeconds | int | `1800` | | +| transformmisc.livenessProbe.maxTransforms | int | `10000` | | +| transformmisc.livenessProbe.path | string | `"/live"` | | +| transformmisc.livenessProbe.periodSeconds | int | `20` | | +| transformmisc.livenessProbe.timeoutSeconds | int | `10` | | +| transformmisc.nodeSelector | object | `{}` | | +| transformmisc.podSecurityContext.runAsNonRoot | bool | `true` | | +| transformmisc.podSecurityContext.runAsUser | int | `33006` | | +| transformmisc.readinessProbe.initialDelaySeconds | int | `20` | | +| transformmisc.readinessProbe.path | string | `"/ready"` | | +| transformmisc.readinessProbe.periodSeconds | int | `60` | | +| transformmisc.readinessProbe.timeoutSeconds | int | `10` | | +| transformmisc.replicaCount | int | `2` | | +| transformmisc.resources.limits.cpu | string | `"2"` | | +| transformmisc.resources.limits.memory | string | `"1000Mi"` | | +| transformmisc.resources.requests.cpu | string | `"0.25"` | | +| transformmisc.resources.requests.memory | string | `"300Mi"` | | +| transformmisc.service.externalPort | int | `80` | | +| transformmisc.service.name | string | `"transformmisc"` | | +| transformmisc.service.type | string | `"ClusterIP"` | | +| transformrouter.enabled | bool | `true` | | +| transformrouter.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | +| transformrouter.image.internalPort | int | `8095` | | +| transformrouter.image.pullPolicy | string | `"IfNotPresent"` | | +| transformrouter.image.repository | string | `"quay.io/alfresco/alfresco-transform-router"` | | +| transformrouter.image.tag | string | `"3.0.0"` | | +| transformrouter.livenessProbe.initialDelaySeconds | int | `20` | | +| transformrouter.livenessProbe.path | string | `"/actuator/health"` | | +| transformrouter.livenessProbe.periodSeconds | int | `30` | | +| transformrouter.livenessProbe.timeoutSeconds | int | `10` | | +| transformrouter.nodeSelector | object | `{}` | | +| transformrouter.podSecurityContext.runAsNonRoot | bool | `true` | | +| transformrouter.podSecurityContext.runAsUser | int | `33016` | | +| transformrouter.readinessProbe.initialDelaySeconds | int | `20` | | +| transformrouter.readinessProbe.path | string | `"/actuator/health"` | | +| transformrouter.readinessProbe.periodSeconds | int | `60` | | +| transformrouter.readinessProbe.timeoutSeconds | int | `10` | | +| transformrouter.replicaCount | int | `2` | | +| transformrouter.resources.limits.cpu | string | `"1"` | | +| transformrouter.resources.limits.memory | string | `"512Mi"` | | +| transformrouter.resources.requests.cpu | string | `"0.25"` | | +| transformrouter.resources.requests.memory | string | `"300Mi"` | | +| transformrouter.service.externalPort | int | `80` | | +| transformrouter.service.name | string | `"transform-router"` | | +| transformrouter.service.type | string | `"ClusterIP"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/alfresco-transform-service/ci/default-values.yaml b/charts/alfresco-transform-service/ci/default-values.yaml new file mode 100644 index 00000000..5f3c5736 --- /dev/null +++ b/charts/alfresco-transform-service/ci/default-values.yaml @@ -0,0 +1,71 @@ +activemq: + enabled: true + resources: + requests: + cpu: "100m" + memory: "512Mi" + limits: + cpu: "1000m" + memory: "1Gi" +transformrouter: + replicaCount: 1 +pdfrenderer: + livenessProbe: + initialDelaySeconds: 30 + resources: + requests: + cpu: "0.01" + memory: "256Mi" + limits: + memory: "512Mi" + replicaCount: 1 +imagemagick: + livenessProbe: + initialDelaySeconds: 30 + resources: + requests: + cpu: "0.01" + memory: "256Mi" + limits: + memory: "512Mi" + replicaCount: 1 +libreoffice: + livenessProbe: + initialDelaySeconds: 30 + resources: + requests: + cpu: "0.01" + memory: "512Mi" + limits: + memory: "1024Mi" + replicaCount: 1 +tika: + livenessProbe: + initialDelaySeconds: 30 + resources: + requests: + cpu: "0.01" + memory: "256Mi" + limits: + memory: "512Mi" + replicaCount: 1 +transformmisc: + livenessProbe: + initialDelaySeconds: 30 + resources: + requests: + cpu: "0.01" + memory: "256Mi" + limits: + memory: "512Mi" + replicaCount: 1 +filestore: + livenessProbe: + initialDelaySeconds: 30 + resources: + requests: + cpu: "0.01" + memory: "128Mi" + limits: + memory: "700Mi" + replicaCount: 1 diff --git a/charts/alfresco-transform-service/templates/_helpers-label.tpl b/charts/alfresco-transform-service/templates/_helpers-label.tpl new file mode 100644 index 00000000..fd933db6 --- /dev/null +++ b/charts/alfresco-transform-service/templates/_helpers-label.tpl @@ -0,0 +1,69 @@ +{{- define "alfresco-transform-service.filestore.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "filestore" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.filestore.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "filestore" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.imagemagick.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "imagemagick" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.imagemagick.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "imagemagick" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.libreoffice.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "libreoffice" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.libreoffice.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "libreoffice" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.pdfrenderer.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "pdfrenderer" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.pdfrenderer.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "pdfrenderer" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.tika.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "tika" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.tika.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "tika" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.transform-misc.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-misc" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.transform-misc.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-misc" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.transform-router.labels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-router" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.labels" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.transform-router.selectorLabels" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-router" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.selectorLabels" $scope }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/_helpers-name.tpl b/charts/alfresco-transform-service/templates/_helpers-name.tpl new file mode 100644 index 00000000..c36c88a2 --- /dev/null +++ b/charts/alfresco-transform-service/templates/_helpers-name.tpl @@ -0,0 +1,69 @@ +{{- define "alfresco-transform-service.config-filestore.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "filestore-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.config-imagemagick.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "imagemagick-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.config-libreoffice.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "libreoffice-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.config-pdfrenderer.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "pdfrenderer-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.config-tika.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "tika-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.config-transform-misc.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-misc-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.config-transform-router.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-router-configmap" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-filestore.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "filestore" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-imagemagick.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "imagemagick" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-libreoffice.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "libreoffice" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-pdfrenderer.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "pdfrenderer" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-tika.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "tika" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-transform-misc.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-misc" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} + +{{- define "alfresco-transform-service.deployment-transform-router.name" -}} +{{- $scope := (dict "Values" (dict "nameOverride" "transform-router" ) "Chart" .Chart "Release" .Release) }} +{{- include "alfresco-transform-service.fullname" $scope }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/_helpers-probes.tpl b/charts/alfresco-transform-service/templates/_helpers-probes.tpl new file mode 100644 index 00000000..82e0c53a --- /dev/null +++ b/charts/alfresco-transform-service/templates/_helpers-probes.tpl @@ -0,0 +1,20 @@ +{{/* +Generate Alfresco Tengines probes +*/}} +{{- define "alfresco-transform-service.probes" -}} +readinessProbe: + httpGet: + path: {{ .readinessProbe.path }} + port: {{ .image.internalPort }} + initialDelaySeconds: {{ .readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .readinessProbe.periodSeconds }} + timeoutSeconds: {{ .readinessProbe.timeoutSeconds }} +livenessProbe: + httpGet: + path: {{ .livenessProbe.path }} + port: {{ .image.internalPort }} + initialDelaySeconds: {{ .livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .livenessProbe.periodSeconds }} + failureThreshold: 3 + timeoutSeconds: {{ .livenessProbe.timeoutSeconds }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/_helpers-sfs.tpl b/charts/alfresco-transform-service/templates/_helpers-sfs.tpl new file mode 100644 index 00000000..c22b9fcf --- /dev/null +++ b/charts/alfresco-transform-service/templates/_helpers-sfs.tpl @@ -0,0 +1,8 @@ +{{/* +Set the Shared File Store URL for T-engines +*/}} +{{- define "alfresco-transform-service.sfs.url" -}} +{{- if .Values.filestore.enabled }} +FILE_STORE_URL: http://{{ template "alfresco-transform-service.deployment-filestore.name" . }}/alfresco/api/-default-/private/sfs/versions/1/file +{{- end }} +{{- end -}} diff --git a/charts/alfresco-transform-service/templates/_helpers.tpl b/charts/alfresco-transform-service/templates/_helpers.tpl new file mode 100644 index 00000000..b9b75d04 --- /dev/null +++ b/charts/alfresco-transform-service/templates/_helpers.tpl @@ -0,0 +1,73 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "alfresco-transform-service.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "alfresco-transform-service.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "alfresco-transform-service.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "alfresco-transform-service.labels" -}} +helm.sh/chart: {{ include "alfresco-transform-service.chart" . }} +{{ include "alfresco-transform-service.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "alfresco-transform-service.selectorLabels" -}} +app.kubernetes.io/name: {{ include "alfresco-transform-service.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "alfresco-transform-service.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "alfresco-transform-service.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create checksum annotations to trigger pods recreation on config changes +*/}} +{{- define "alfresco-transform-service.configsums" -}} +{{- $context := .Context -}} +{{- $component_config := printf "config-%s" .Component -}} +{{- range list "secret-messagebroker" $component_config }} +checksum.alfresco.org/{{ . }}: {{ include (print $context.Template.BasePath "/" . ".yaml") $context | sha256sum }} +{{- end }} +{{- end -}} diff --git a/charts/alfresco-transform-service/templates/config-filestore.yaml b/charts/alfresco-transform-service/templates/config-filestore.yaml new file mode 100644 index 00000000..940648fe --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-filestore.yaml @@ -0,0 +1,13 @@ +{{- if .Values.filestore.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-filestore.name" . }} + labels: + {{- include "alfresco-transform-service.filestore.labels" . | nindent 4 }} +data: + {{- toYaml .Values.filestore.environment | nindent 2 }} + {{- range $key, $val := .Values.filestore.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/config-imagemagick.yaml b/charts/alfresco-transform-service/templates/config-imagemagick.yaml new file mode 100644 index 00000000..5c5f3194 --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-imagemagick.yaml @@ -0,0 +1,14 @@ +{{- if .Values.imagemagick.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-imagemagick.name" . }} + labels: + {{- include "alfresco-transform-service.imagemagick.labels" . | nindent 4 }} +data: + {{- include "alfresco-transform-service.sfs.url" . | indent 2 }} + {{- toYaml .Values.imagemagick.environment | nindent 2 }} + {{- range $key, $val := .Values.imagemagick.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/config-libreoffice.yaml b/charts/alfresco-transform-service/templates/config-libreoffice.yaml new file mode 100644 index 00000000..412b9714 --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-libreoffice.yaml @@ -0,0 +1,14 @@ +{{- if .Values.libreoffice.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-libreoffice.name" . }} + labels: + {{- include "alfresco-transform-service.libreoffice.labels" . | nindent 4 }} +data: + {{- include "alfresco-transform-service.sfs.url" . | indent 2 }} + {{- toYaml .Values.libreoffice.environment | nindent 2 }} + {{- range $key, $val := .Values.libreoffice.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/config-pdfrenderer.yaml b/charts/alfresco-transform-service/templates/config-pdfrenderer.yaml new file mode 100644 index 00000000..a22ef6c5 --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-pdfrenderer.yaml @@ -0,0 +1,14 @@ +{{- if .Values.pdfrenderer.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-pdfrenderer.name" . }} + labels: + {{- include "alfresco-transform-service.pdfrenderer.labels" . | nindent 4 }} +data: + {{- include "alfresco-transform-service.sfs.url" . | indent 2 }} + {{- toYaml .Values.pdfrenderer.environment | nindent 2 }} + {{- range $key, $val := .Values.pdfrenderer.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/config-tika.yaml b/charts/alfresco-transform-service/templates/config-tika.yaml new file mode 100644 index 00000000..7872bd60 --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-tika.yaml @@ -0,0 +1,14 @@ +{{- if .Values.tika.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-tika.name" . }} + labels: + {{- include "alfresco-transform-service.tika.labels" . | nindent 4 }} +data: + {{- include "alfresco-transform-service.sfs.url" . | indent 2 }} + {{- toYaml .Values.tika.environment | nindent 2 }} + {{- range $key, $val := .Values.tika.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/config-transform-misc.yaml b/charts/alfresco-transform-service/templates/config-transform-misc.yaml new file mode 100644 index 00000000..290df64c --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-transform-misc.yaml @@ -0,0 +1,14 @@ +{{- if .Values.transformmisc.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-transform-misc.name" . }} + labels: + {{- include "alfresco-transform-service.transform-misc.labels" . | nindent 4 }} +data: + {{- include "alfresco-transform-service.sfs.url" . | indent 2 }} + {{- toYaml .Values.transformmisc.environment | nindent 2 }} + {{- range $key, $val := .Values.transformmisc.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/config-transform-router.yaml b/charts/alfresco-transform-service/templates/config-transform-router.yaml new file mode 100644 index 00000000..30148b38 --- /dev/null +++ b/charts/alfresco-transform-service/templates/config-transform-router.yaml @@ -0,0 +1,27 @@ +{{- if .Values.transformrouter.enabled }} +# Defines the properties required by the transform router container +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "alfresco-transform-service.config-transform-router.name" . }} + labels: + {{- include "alfresco-transform-service.transform-router.labels" . | nindent 4 }} +data: + {{- include "alfresco-transform-service.sfs.url" . | nindent 2 }} + IMAGEMAGICK_URL: http://{{ template "alfresco-transform-service.deployment-imagemagick.name" . }}:80 + PDF_RENDERER_URL: http://{{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }}:80 + LIBREOFFICE_URL: http://{{ template "alfresco-transform-service.deployment-libreoffice.name" . }}:80 + TIKA_URL: http://{{ template "alfresco-transform-service.deployment-tika.name" . }}:80 + {{- if .Values.transformmisc.enabled }} + MISC_URL: http://{{ template "alfresco-transform-service.deployment-transform-misc.name" . }}:80 + {{- end }} + {{- if .Values.ai.enabled }} + TRANSFORMER_URL_AWS_AI: http://{{ template "alfresco-transform-service.fullname" (dict "Values" .Values.ai "Release" .Release "Chart" .Chart) }} + TRANSFORMER_QUEUE_AWS_AI: "org.alfresco.transform.engine.ai-aws.acs" + TRANSFORMER_ROUTES_ADDITIONAL_AI: "/mnt/routes/ai-pipeline-routes.json" + {{- end }} + {{- toYaml .Values.transformrouter.environment | nindent 2 }} + {{- range $key, $val := .Values.transformrouter.livenessProbe }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-filestore.yaml b/charts/alfresco-transform-service/templates/deployment-filestore.yaml new file mode 100644 index 00000000..86d047ce --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-filestore.yaml @@ -0,0 +1,68 @@ +{{- if .Values.filestore.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-filestore.name" . }} + labels: + {{- include "alfresco-transform-service.filestore.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.filestore.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.filestore.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/config-filestore.yaml") . | sha256sum }} + labels: + {{- include "alfresco-transform-service.filestore.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.filestore | indent 4 }} + {{- if .Values.filestore.nodeSelector }} + nodeSelector: {{- .Values.filestore.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-filestore.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-filestore.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.filestore.image.repository }}:{{ .Values.filestore.image.tag }}" + imagePullPolicy: {{ .Values.filestore.image.pullPolicy }} + {{- include "component-security-context" .Values.filestore | indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-filestore.name" . }} + ports: + - containerPort: {{ .Values.filestore.image.internalPort }} + resources: {{- toYaml .Values.filestore.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.filestore | nindent 10 }} + volumeMounts: + - name: data + mountPath: {{ .Values.filestore.persistence.data.mountPath }} + subPath: {{ .Values.filestore.persistence.data.subPath }} + volumes: + {{- include "data_volume" .Values.filestore | nindent 8 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml b/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml new file mode 100644 index 00000000..c6db75c4 --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml @@ -0,0 +1,66 @@ +{{- if .Values.imagemagick.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-imagemagick.name" . }} + labels: + {{- include "alfresco-transform-service.imagemagick.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.imagemagick.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.imagemagick.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + template: + metadata: + annotations: + {{- include "alfresco-transform-service.configsums" (dict "Context" $ "Component" "imagemagick") | indent 8 }} + labels: + {{- include "alfresco-transform-service.imagemagick.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.imagemagick| indent 4 }} + {{- if .Values.imagemagick.nodeSelector }} + nodeSelector: {{- .Values.imagemagick.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-imagemagick.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-imagemagick.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.imagemagick.image.repository }}:{{ .Values.imagemagick.image.tag }}" + imagePullPolicy: {{ .Values.imagemagick.image.pullPolicy }} + {{- include "component-security-context" .Values.imagemagick| indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-imagemagick.name" . }} + - secretRef: + name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-transform-service.fullname" $)) $.Values.messageBroker.existingSecretName }} + env: + {{- include "activemq.env" . | nindent 12 }} + ports: + - containerPort: {{ .Values.imagemagick.image.internalPort }} + resources: {{- toYaml .Values.imagemagick.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.imagemagick | nindent 10 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml b/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml new file mode 100644 index 00000000..3173db30 --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml @@ -0,0 +1,66 @@ +{{- if .Values.libreoffice.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-libreoffice.name" . }} + labels: + {{- include "alfresco-transform-service.libreoffice.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.libreoffice.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.libreoffice.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + template: + metadata: + annotations: + {{- include "alfresco-transform-service.configsums" (dict "Context" $ "Component" "libreoffice") | indent 8 }} + labels: + {{- include "alfresco-transform-service.libreoffice.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.libreoffice | indent 4 }} + {{- if .Values.libreoffice.nodeSelector }} + nodeSelector: {{- .Values.libreoffice.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-libreoffice.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-libreoffice.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.libreoffice.image.repository }}:{{ .Values.libreoffice.image.tag }}" + imagePullPolicy: {{ .Values.libreoffice.image.pullPolicy }} + {{- include "component-security-context" .Values.libreoffice | indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-libreoffice.name" . }} + - secretRef: + name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-transform-service.fullname" $)) $.Values.messageBroker.existingSecretName }} + env: + {{- include "activemq.env" . | nindent 12 }} + ports: + - containerPort: {{ .Values.libreoffice.image.internalPort }} + resources: {{- toYaml .Values.libreoffice.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.libreoffice | nindent 10 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml b/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml new file mode 100644 index 00000000..3dfa5b21 --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml @@ -0,0 +1,66 @@ +{{- if .Values.pdfrenderer.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }} + labels: + {{- include "alfresco-transform-service.pdfrenderer.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.pdfrenderer.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.pdfrenderer.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + template: + metadata: + annotations: + {{- include "alfresco-transform-service.configsums" (dict "Context" $ "Component" "pdfrenderer") | indent 8 }} + labels: + {{- include "alfresco-transform-service.pdfrenderer.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.pdfrenderer | indent 4 }} + {{- if .Values.pdfrenderer.nodeSelector }} + nodeSelector: {{- .Values.pdfrenderer.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.pdfrenderer.image.repository }}:{{ .Values.pdfrenderer.image.tag }}" + imagePullPolicy: {{ .Values.pdfrenderer.image.pullPolicy }} + {{- include "component-security-context" .Values.pdfrenderer | indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-pdfrenderer.name" . }} + - secretRef: + name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-transform-service.fullname" $)) $.Values.messageBroker.existingSecretName }} + env: + {{- include "activemq.env" . | nindent 12 }} + ports: + - containerPort: {{ .Values.pdfrenderer.image.internalPort }} + resources: {{- toYaml .Values.pdfrenderer.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.pdfrenderer | nindent 10 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-tika.yaml b/charts/alfresco-transform-service/templates/deployment-tika.yaml new file mode 100644 index 00000000..7de8c66c --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-tika.yaml @@ -0,0 +1,66 @@ +{{- if .Values.tika.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-tika.name" . }} + labels: + {{- include "alfresco-transform-service.tika.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.tika.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.tika.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + template: + metadata: + annotations: + {{- include "alfresco-transform-service.configsums" (dict "Context" $ "Component" "tika") | indent 8 }} + labels: + {{- include "alfresco-transform-service.tika.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.tika | indent 4 }} + {{- if .Values.tika.nodeSelector }} + nodeSelector: {{- .Values.tika.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-tika.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-tika.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.tika.image.repository }}:{{ .Values.tika.image.tag }}" + imagePullPolicy: {{ .Values.tika.image.pullPolicy }} + {{- include "component-security-context" .Values.tika | indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-tika.name" . }} + - secretRef: + name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-transform-service.fullname" $)) $.Values.messageBroker.existingSecretName }} + env: + {{- include "activemq.env" . | nindent 12 }} + ports: + - containerPort: {{ .Values.tika.image.internalPort }} + resources: {{- toYaml .Values.tika.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.tika | nindent 10 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml b/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml new file mode 100644 index 00000000..97dd981a --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml @@ -0,0 +1,66 @@ +{{- if .Values.transformmisc.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-transform-misc.name" . }} + labels: + {{- include "alfresco-transform-service.transform-misc.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.transformmisc.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.transform-misc.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: +{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} + template: + metadata: + annotations: + {{- include "alfresco-transform-service.configsums" (dict "Context" $ "Component" "transform-misc") | indent 8 }} + labels: + {{- include "alfresco-transform-service.transform-misc.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.transformmisc | indent 4 }} + {{- if .Values.transformmisc.nodeSelector }} + nodeSelector: {{- .Values.transformmisc.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-transform-misc.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-transform-misc.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.transformmisc.image.repository }}:{{ .Values.transformmisc.image.tag }}" + imagePullPolicy: {{ .Values.transformmisc.image.pullPolicy }} + {{- include "component-security-context" .Values.transformmisc | indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-transform-misc.name" . }} + - secretRef: + name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-transform-service.fullname" $)) $.Values.messageBroker.existingSecretName }} + env: + {{- include "activemq.env" . | nindent 12 }} + ports: + - containerPort: {{ .Values.transformmisc.image.internalPort }} + resources: {{- toYaml .Values.transformmisc.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.transformmisc | nindent 10 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/deployment-transform-router.yaml b/charts/alfresco-transform-service/templates/deployment-transform-router.yaml new file mode 100644 index 00000000..38552ace --- /dev/null +++ b/charts/alfresco-transform-service/templates/deployment-transform-router.yaml @@ -0,0 +1,77 @@ +{{- if .Values.transformrouter.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "alfresco-transform-service.deployment-transform-router.name" . }} + labels: + {{- include "alfresco-transform-service.transform-router.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.transformrouter.replicaCount }} + selector: + matchLabels: + {{- include "alfresco-transform-service.transform-router.selectorLabels" . | nindent 6 }} + strategy: + type: RollingUpdate + rollingUpdate: + {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + template: + metadata: + annotations: + {{- include "alfresco-transform-service.configsums" (dict "Context" $ "Component" "transform-router") | indent 8 }} + labels: + {{- include "alfresco-transform-service.transform-router.selectorLabels" . | nindent 8 }} + spec: + {{- include "component-pod-security-context" .Values.transformrouter | indent 4 }} + {{- if .Values.transformrouter.nodeSelector }} + nodeSelector: {{- .Values.transformrouter.nodeSelector | toYaml | nindent 8 }} + {{- end }} + {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-transform-router.name" . }} + topologyKey: failure-domain.beta.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.deployment-transform-router.name" . }} + topologyKey: kubernetes.io/hostname + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.transformrouter.image.repository }}:{{ .Values.transformrouter.image.tag }}" + imagePullPolicy: {{ .Values.transformrouter.image.pullPolicy }} + {{- include "component-security-context" .Values.transformrouter | indent 8 }} + envFrom: + - configMapRef: + name: {{ template "alfresco-transform-service.config-transform-router.name" . }} + - secretRef: + name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-transform-service.fullname" $)) $.Values.messageBroker.existingSecretName }} + env: + {{- include "activemq.env" . | nindent 12 }} + ports: + - containerPort: {{ .Values.transformrouter.image.internalPort }} + resources: {{- toYaml .Values.transformrouter.resources | nindent 12 }} + {{ include "alfresco-transform-service.probes" .Values.transformrouter | nindent 10 }} + {{- if .Values.ai.enabled }} + volumeMounts: + - name: config-volume + mountPath: /mnt/routes + {{- end }} + {{- if .Values.ai.enabled }} + volumes: + - name: config-volume + configMap: + name: {{ template "alfresco.shortname" . }}-transform-routes-configmap + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/pvc-filestore.yaml b/charts/alfresco-transform-service/templates/pvc-filestore.yaml new file mode 100644 index 00000000..299f70a3 --- /dev/null +++ b/charts/alfresco-transform-service/templates/pvc-filestore.yaml @@ -0,0 +1,3 @@ +{{- if and (not .Values.filestore.persistence.existingClaim) .Values.filestore.enabled .Values.filestore.persistence.enabled }} +{{ include "component_pvc" .Values.filestore }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/secret-messagebroker.yaml b/charts/alfresco-transform-service/templates/secret-messagebroker.yaml new file mode 100644 index 00000000..c1adc888 --- /dev/null +++ b/charts/alfresco-transform-service/templates/secret-messagebroker.yaml @@ -0,0 +1,19 @@ +{{- if not .Values.messageBroker.existingSecretName }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "alfresco-transform-service.fullname" . }}-messagebroker-secret + labels: + {{- include "alfresco-transform-service.labels" $ | nindent 4 }} +type: Opaque +data: + {{- if .Values.activemq.enabled }} + BROKER_URL: {{ printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "alfresco-transform-service.fullname" (dict "Values" .Values.activemq "Chart" .Chart "Release" .Release)) | b64enc | quote }} + BROKER_USERNAME: {{ .Values.activemq.adminUser.user | b64enc | quote }} + BROKER_PASSWORD: {{ .Values.activemq.adminUser.password | b64enc | quote }} + {{- else }} + BROKER_URL: {{ required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url | b64enc | quote }} + BROKER_USERNAME: {{ .Values.messageBroker.user | b64enc | quote }} + BROKER_PASSWORD: {{ .Values.messageBroker.password | b64enc | quote }} + {{- end }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-filestore.yaml b/charts/alfresco-transform-service/templates/svc-filestore.yaml new file mode 100644 index 00000000..8124a48a --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-filestore.yaml @@ -0,0 +1,16 @@ +{{- if .Values.filestore.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.deployment-filestore.name" . }} + labels: + {{- include "alfresco-transform-service.filestore.labels" . | nindent 4 }} +spec: + type: {{ .Values.filestore.service.type }} + ports: + - port: {{ .Values.filestore.service.externalPort }} + targetPort: {{ .Values.filestore.image.internalPort }} + name: {{ .Values.filestore.service.name }} + selector: + {{- include "alfresco-transform-service.filestore.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-imagemagick.yaml b/charts/alfresco-transform-service/templates/svc-imagemagick.yaml new file mode 100644 index 00000000..2a1090d4 --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-imagemagick.yaml @@ -0,0 +1,17 @@ +{{- if .Values.imagemagick.enabled }} +{{- $componentScope := (dict "Values" (dict "nameOverride" "imagemagick" ) "Chart" .Chart "Release" .Release) }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.deployment-imagemagick.name" . }} + labels: + {{- include "alfresco-transform-service.imagemagick.labels" . | nindent 4 }} +spec: + type: {{ .Values.imagemagick.service.type }} + ports: + - port: {{ .Values.imagemagick.service.externalPort }} + targetPort: {{ .Values.imagemagick.image.internalPort }} + name: {{ .Values.imagemagick.service.name }} + selector: + {{- include "alfresco-transform-service.imagemagick.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-libreoffice.yaml b/charts/alfresco-transform-service/templates/svc-libreoffice.yaml new file mode 100644 index 00000000..b38b5ef4 --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-libreoffice.yaml @@ -0,0 +1,16 @@ +{{- if .Values.libreoffice.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.deployment-libreoffice.name" . }} + labels: + {{- include "alfresco-transform-service.libreoffice.labels" . | nindent 4 }} +spec: + type: {{ .Values.libreoffice.service.type }} + ports: + - port: {{ .Values.libreoffice.service.externalPort }} + targetPort: {{ .Values.libreoffice.image.internalPort }} + name: {{ .Values.libreoffice.service.name }} + selector: + {{- include "alfresco-transform-service.libreoffice.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-pdfrenderer.yaml b/charts/alfresco-transform-service/templates/svc-pdfrenderer.yaml new file mode 100644 index 00000000..fb3eed22 --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-pdfrenderer.yaml @@ -0,0 +1,16 @@ +{{- if .Values.pdfrenderer.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }} + labels: + {{- include "alfresco-transform-service.pdfrenderer.labels" . | nindent 4 }} +spec: + type: {{ .Values.pdfrenderer.service.type }} + ports: + - port: {{ .Values.pdfrenderer.service.externalPort }} + targetPort: {{ .Values.pdfrenderer.image.internalPort }} + name: {{ .Values.pdfrenderer.service.name }} + selector: + {{- include "alfresco-transform-service.pdfrenderer.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-tika.yaml b/charts/alfresco-transform-service/templates/svc-tika.yaml new file mode 100644 index 00000000..bc20f2c1 --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-tika.yaml @@ -0,0 +1,16 @@ +{{- if .Values.tika.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.deployment-tika.name" . }} + labels: + {{- include "alfresco-transform-service.tika.labels" . | nindent 4 }} +spec: + type: {{ .Values.tika.service.type }} + ports: + - port: {{ .Values.tika.service.externalPort }} + targetPort: {{ .Values.tika.image.internalPort }} + name: {{ .Values.tika.service.name }} + selector: + {{- include "alfresco-transform-service.tika.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-transform-misc.yaml b/charts/alfresco-transform-service/templates/svc-transform-misc.yaml new file mode 100644 index 00000000..88603221 --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-transform-misc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.transformmisc.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.deployment-transform-misc.name" . }} + labels: + {{- include "alfresco-transform-service.transform-misc.labels" . | nindent 4 }} +spec: + type: {{ .Values.transformmisc.service.type }} + ports: + - port: {{ .Values.transformmisc.service.externalPort }} + targetPort: {{ .Values.transformmisc.image.internalPort }} + name: {{ .Values.transformmisc.service.name }} + selector: + {{- include "alfresco-transform-service.transform-misc.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/templates/svc-transform-router.yaml b/charts/alfresco-transform-service/templates/svc-transform-router.yaml new file mode 100644 index 00000000..c4671782 --- /dev/null +++ b/charts/alfresco-transform-service/templates/svc-transform-router.yaml @@ -0,0 +1,18 @@ +{{- if .Values.transformrouter.enabled }} +{{- $componentScope := (dict "Values" (dict "nameOverride" "router" ) "Chart" .Chart "Release" .Release) }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "alfresco-transform-service.fullname" $componentScope }} + labels: + {{- include "alfresco-transform-service.labels" $componentScope | nindent 4 }} +spec: + type: {{ .Values.transformrouter.service.type }} + ports: + - port: {{ .Values.transformrouter.service.externalPort }} + targetPort: {{ .Values.transformrouter.image.internalPort }} + protocol: TCP + name: {{ .Values.transformrouter.service.name }} + selector: + {{- include "alfresco-transform-service.selectorLabels" $componentScope | nindent 4 }} +{{- end }} diff --git a/charts/alfresco-transform-service/tests/components-toggle_test.yaml b/charts/alfresco-transform-service/tests/components-toggle_test.yaml new file mode 100644 index 00000000..a0071904 --- /dev/null +++ b/charts/alfresco-transform-service/tests/components-toggle_test.yaml @@ -0,0 +1,92 @@ +--- +suite: test components deployed based on ACS flavor (enterprise vs community) +templates: + - config-libreoffice.yaml + - deployment-libreoffice.yaml + - config-imagemagick.yaml + - deployment-imagemagick.yaml + - config-tika.yaml + - deployment-tika.yaml + - config-transform-router.yaml + - deployment-transform-router.yaml + - config-transform-misc.yaml + - deployment-transform-misc.yaml + - config-pdfrenderer.yaml + - deployment-pdfrenderer.yaml + - config-filestore.yaml + - deployment-filestore.yaml + - secret-messagebroker.yaml + +tests: + - it: should render Enterprise config by default + values: &testvalues + - values/test_values.yaml + asserts: + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-filestore.yaml + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-transform-router.yaml + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-imagemagick.yaml + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-libreoffice.yaml + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-tika.yaml + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-transform-misc.yaml + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + template: deployment-pdfrenderer.yaml + - it: should not render any component by evaluaating false expression + values: &testvalues + - values/test_values.yaml + set: + filestore: + enabled: false + transformrouter: + enabled: false + imagemagick: + enabled: false + libreoffice: + enabled: false + tika: + enabled: false + transformmisc: + enabled: false + pdfrenderer: + enabled: false + asserts: + - hasDocuments: + count: 0 + template: deployment-filestore.yaml + - hasDocuments: + count: 0 + template: deployment-transform-router.yaml + - hasDocuments: + count: 0 + template: deployment-imagemagick.yaml + - hasDocuments: + count: 0 + template: deployment-libreoffice.yaml + - hasDocuments: + count: 0 + template: deployment-tika.yaml + - hasDocuments: + count: 0 + template: deployment-transform-misc.yaml + - hasDocuments: + count: 0 + template: deployment-pdfrenderer.yaml diff --git a/charts/alfresco-transform-service/tests/config-libreoffice_test.yaml b/charts/alfresco-transform-service/tests/config-libreoffice_test.yaml new file mode 100644 index 00000000..ca2a5dd5 --- /dev/null +++ b/charts/alfresco-transform-service/tests/config-libreoffice_test.yaml @@ -0,0 +1,26 @@ +--- +suite: test libreoffice configmap +templates: + - config-libreoffice.yaml + +tests: + - it: should render default contents + values: &testvalues + - values/test_values.yaml + asserts: + - equal: + path: data.JAVA_OPTS + value: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + template: config-libreoffice.yaml + - equal: + path: data.FILE_STORE_URL + value: http://RELEASE-NAME-filestore/alfresco/api/-default-/private/sfs/versions/1/file + template: config-libreoffice.yaml + - equal: + path: data.livenessPercent + value: "250" + template: config-libreoffice.yaml + - equal: + path: data.livenessTransformPeriodSeconds + value: "600" + template: config-libreoffice.yaml diff --git a/charts/alfresco-transform-service/tests/config-tranform-router_test.yaml b/charts/alfresco-transform-service/tests/config-tranform-router_test.yaml new file mode 100644 index 00000000..9979d20f --- /dev/null +++ b/charts/alfresco-transform-service/tests/config-tranform-router_test.yaml @@ -0,0 +1,36 @@ +--- +suite: test T-Router configmap +templates: + - config-transform-router.yaml + +tests: + - it: should render without AI config + values: &testvalues + - values/test_values.yaml + asserts: + - notExists: + path: data.TRANSFORMER_URL_AWS_AI + template: config-transform-router.yaml + - it: should render with AI config overiding release name + values: &testvalues + - values/test_values.yaml + set: + ai: + enabled: true + fullnameOverride: my-alfresci-ai-svc + asserts: + - equal: + path: data.TRANSFORMER_URL_AWS_AI + value: http://my-alfresci-ai-svc + template: config-transform-router.yaml + - it: should render with AI config release name + values: *testvalues + set: + ai: + enabled: true + nameOverride: my-alfresci-ai-svc + asserts: + - equal: + path: data.TRANSFORMER_URL_AWS_AI + value: http://RELEASE-NAME-my-alfresci-ai-svc + template: config-transform-router.yaml diff --git a/charts/alfresco-transform-service/tests/pv-transform_test.yaml b/charts/alfresco-transform-service/tests/pv-transform_test.yaml new file mode 100644 index 00000000..0dac2f23 --- /dev/null +++ b/charts/alfresco-transform-service/tests/pv-transform_test.yaml @@ -0,0 +1,74 @@ +--- +suite: test persistence +templates: + - config-filestore.yaml + - deployment-filestore.yaml + - pvc-filestore.yaml +tests: + - it: should render an ephemeral volume + values: &testvalues + - values/test_values.yaml + set: + filestore: + persistence: + enabled: false + asserts: + - contains: + path: spec.template.spec.volumes + content: + emptyDir: + sizeLimit: 20Gi + name: data + template: deployment-filestore.yaml + + - it: should render a deployment with set claim + values: *testvalues + set: + filestore: + persistence: + enabled: true + existingClaim: mysfsvolume + asserts: + - equal: + path: >- + spec.template.spec.volumes[0].persistentVolumeClaim.claimName + value: mysfsvolume + template: deployment-filestore.yaml + + - it: should render a deployment with dynamic claim name + values: *testvalues + set: + filestore: + persistence: + enabled: true + volumeMode: Block + accessModes: + - ReadWriteMany + - ReadOnlyMany + asserts: + - equal: + path: >- + spec.template.spec.volumes[0].persistentVolumeClaim.claimName + value: filestore-default-pvc + template: deployment-filestore.yaml + - isNull: + path: spec.storageClassName + template: pvc-filestore.yaml + + - it: should render a deployment with provided storage class + values: *testvalues + set: + filestore: + persistence: + enabled: true + storageClass: cheap + asserts: + - equal: + path: >- + spec.template.spec.volumes[0].persistentVolumeClaim.claimName + value: filestore-cheap-pvc + template: deployment-filestore.yaml + - equal: + path: spec.storageClassName + value: cheap + template: pvc-filestore.yaml diff --git a/charts/alfresco-transform-service/tests/secrets_test.yaml b/charts/alfresco-transform-service/tests/secrets_test.yaml new file mode 100644 index 00000000..d8734709 --- /dev/null +++ b/charts/alfresco-transform-service/tests/secrets_test.yaml @@ -0,0 +1,29 @@ +--- +suite: test ActiveMQ secrets +templates: + - secret-messagebroker.yaml + +tests: + - it: should render a secret with provided credentials + values: &testvalues + - values/test_values.yaml + asserts: + - equal: + path: data.BROKER_USERNAME + value: YWxmcmVzY28= + template: secret-messagebroker.yaml + - equal: + path: data.BROKER_PASSWORD + value: c29tZXNlY3JldA== + template: secret-messagebroker.yaml + - it: should not render a secret at all + values: &testvalues + - values/test_values.yaml + set: + messageBroker: + url: failover:(nio://ssl://somesecureserver) + existingSecretName: myns/mysecret + asserts: + - hasDocuments: + count: 0 + template: secret-messagebroker.yaml diff --git a/charts/alfresco-transform-service/tests/values/test_values.yaml b/charts/alfresco-transform-service/tests/values/test_values.yaml new file mode 100644 index 00000000..0e9a47b4 --- /dev/null +++ b/charts/alfresco-transform-service/tests/values/test_values.yaml @@ -0,0 +1,6 @@ +--- +activemq: + enabled: true + adminUser: + user: alfresco + password: somesecret diff --git a/charts/alfresco-transform-service/values.yaml b/charts/alfresco-transform-service/values.yaml new file mode 100644 index 00000000..fdf124d2 --- /dev/null +++ b/charts/alfresco-transform-service/values.yaml @@ -0,0 +1,345 @@ +transformrouter: + enabled: true + replicaCount: 2 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-transform-router + tag: 3.0.0 + pullPolicy: IfNotPresent + internalPort: 8095 + service: + name: transform-router + type: ClusterIP + externalPort: 80 + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /actuator/health + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /actuator/health + initialDelaySeconds: 20 + periodSeconds: 30 + timeoutSeconds: 10 + podSecurityContext: + runAsNonRoot: true + runAsUser: 33016 + resources: + requests: + cpu: "0.25" + memory: "300Mi" + limits: + cpu: "1" + memory: "512Mi" + +pdfrenderer: + enabled: true + replicaCount: 2 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-pdf-renderer + tag: 4.0.0 + pullPolicy: IfNotPresent + internalPort: 8090 + service: + name: pdfrenderer + type: ClusterIP + externalPort: 80 + podSecurityContext: + runAsNonRoot: true + runAsUser: 33001 + resources: + requests: + cpu: "0.25" + memory: "300Mi" + limits: + cpu: "2" + memory: "1000Mi" + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /ready + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /live + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + livenessPercent: 150 + livenessTransformPeriodSeconds: 600 + maxTransforms: 10000 + maxTransformSeconds: 1200 + +imagemagick: + enabled: true + replicaCount: 2 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-imagemagick + tag: 4.0.0 + pullPolicy: IfNotPresent + internalPort: 8090 + service: + name: imagemagick + type: ClusterIP + externalPort: 80 + podSecurityContext: + runAsNonRoot: true + runAsUser: 33002 + resources: + requests: + cpu: "0.5" + memory: "300Mi" + limits: + cpu: "4" + memory: "1000Mi" + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /ready + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /live + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + livenessPercent: 150 + livenessTransformPeriodSeconds: 600 + maxTransforms: 10000 + maxTransformSeconds: 900 + +libreoffice: + enabled: true + replicaCount: 2 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-libreoffice + tag: 4.0.0 + pullPolicy: IfNotPresent + internalPort: 8090 + service: + name: libreoffice + type: ClusterIP + externalPort: 80 + resources: + requests: + cpu: "0.5" + memory: "400Mi" + limits: + cpu: "4" + memory: "1000Mi" + podSecurityContext: + runAsNonRoot: true + runAsUser: 33003 + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /ready + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /live + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + livenessPercent: 250 + livenessTransformPeriodSeconds: 600 + maxTransforms: 99999 + maxTransformSeconds: 1800 + +tika: + enabled: true + replicaCount: 2 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-tika + tag: 4.0.0 + pullPolicy: IfNotPresent + internalPort: 8090 + service: + name: tika + type: ClusterIP + externalPort: 80 + podSecurityContext: + runAsNonRoot: true + runAsUser: 33004 + resources: + requests: + cpu: "0.25" + memory: "600Mi" + limits: + cpu: "2" + memory: "1000Mi" + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /ready + initialDelaySeconds: 30 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /live + initialDelaySeconds: 30 + periodSeconds: 20 + timeoutSeconds: 10 + livenessPercent: 400 + livenessTransformPeriodSeconds: 600 + maxTransforms: 10000 + maxTransformSeconds: 1800 + +transformmisc: + enabled: true + replicaCount: 2 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-transform-misc + tag: 4.0.0 + pullPolicy: IfNotPresent + internalPort: 8090 + service: + name: transformmisc + type: ClusterIP + externalPort: 80 + podSecurityContext: + runAsNonRoot: true + runAsUser: 33006 + resources: + requests: + cpu: "0.25" + memory: "300Mi" + limits: + cpu: "2" + memory: "1000Mi" + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /ready + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /live + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + livenessPercent: 400 + livenessTransformPeriodSeconds: 600 + maxTransforms: 10000 + maxTransformSeconds: 1800 + +filestore: + enabled: true + replicaCount: 1 + nodeSelector: {} + image: + repository: quay.io/alfresco/alfresco-shared-file-store + tag: 3.0.0 + pullPolicy: IfNotPresent + internalPort: 8099 + initContainer: + image: + repository: busybox + tag: 1.35.0 + pullPolicy: IfNotPresent + resources: + limits: + cpu: "0.50" + memory: "10Mi" + service: + name: filestore + type: ClusterIP + externalPort: 80 + podSecurityContext: + runAsUser: 33030 + runAsGroup: 1000 + fsGroup: 1000 + resources: + requests: + cpu: "0.25" + memory: "200Mi" + limits: + cpu: "2" + memory: "1000Mi" + environment: + scheduler.content.age.millis: "86400000" + scheduler.cleanup.interval: "86400000" + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + readinessProbe: + path: /ready + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + livenessProbe: + path: /live + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + livenessPercent: 150 + livenessSavePeriodSeconds: 600 + persistence: + # -- Persist filestore data + enabled: true + # -- Specify a storageClass for dynamic provisioning + accessModes: + - ReadWriteOnce + # -- Bind PVC based on storageClass (e.g. dynamic provisionning) + storageClass: + # -- Use pre-provisioned pv through its claim (e.g. static provisionning) + existingClaim: null + data: + mountPath: "/tmp/Alfresco" + subPath: "alfresco-content-services/filestore-data" + +activemq: + nameOverride: activemq + enabled: false + # -- Possibility to choose Node for pod, with a key-value pair label + # e.g {"kubernetes.io/hostname": multinode-demo-m02} + nodeSelector: {} + adminUser: + # -- Default username for the embedded broker admin user + user: admin + # -- Default password for the embedded broker admin user + password: admin + +# -- external activemq connection setting when activemq.enabled=false +messageBroker: + url: null + user: null + password: null + # -- Name of the secret managed by this chart + secretName: acs-alfresco-cs-brokersecret + # -- Alternatively, provide credentials via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys + existingSecretName: null + +ai: + enabled: false + nameOverride: alfresco-ai + +global: + alfrescoRegistryPullSecrets: quay-registry-secret + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0