From a4b5dcf93e95d1d1d0418545a3afb88becf82720 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo <71768+gionn@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:52:40 +0200 Subject: [PATCH] OPSEXP-2504 Configurable strategy.type for filestore (#344) --- charts/alfresco-transform-service/Chart.yaml | 2 +- charts/alfresco-transform-service/README.md | 3 ++- .../templates/deployment-filestore.yaml | 4 ++-- .../tests/deployment-filestore_test.yaml | 23 +++++++++++++++++++ charts/alfresco-transform-service/values.yaml | 3 +++ 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 charts/alfresco-transform-service/tests/deployment-filestore_test.yaml diff --git a/charts/alfresco-transform-service/Chart.yaml b/charts/alfresco-transform-service/Chart.yaml index 6afcb2ff..763628ef 100644 --- a/charts/alfresco-transform-service/Chart.yaml +++ b/charts/alfresco-transform-service/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: alfresco-transform-service description: A Helm chart for deploying Alfresco Transform Services type: application -version: 2.0.0 +version: 2.1.0-alpha.0 appVersion: 4.1.3 dependencies: - name: alfresco-common diff --git a/charts/alfresco-transform-service/README.md b/charts/alfresco-transform-service/README.md index 8994b687..e4c48bf0 100644 --- a/charts/alfresco-transform-service/README.md +++ b/charts/alfresco-transform-service/README.md @@ -5,7 +5,7 @@ parent: Charts Reference # alfresco-transform-service -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.1.3](https://img.shields.io/badge/AppVersion-4.1.3-informational?style=flat-square) +![Version: 2.1.0-alpha.0](https://img.shields.io/badge/Version-2.1.0--alpha.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.1.3](https://img.shields.io/badge/AppVersion-4.1.3-informational?style=flat-square) A Helm chart for deploying Alfresco Transform Services @@ -66,6 +66,7 @@ Checkout [alfresco-content-services chart's doc](https://github.com/Alfresco/acs | filestore.service.externalPort | int | `80` | | | filestore.service.name | string | `"filestore"` | | | filestore.service.type | string | `"ClusterIP"` | | +| filestore.strategy.type | string | `"RollingUpdate"` | Custom strategy for filestore deployment | | filestore.tolerations | list | `[]` | | | filestore.volumeMounts | list | `[]` | | | filestore.volumes | list | `[]` | | diff --git a/charts/alfresco-transform-service/templates/deployment-filestore.yaml b/charts/alfresco-transform-service/templates/deployment-filestore.yaml index 7fc18b63..f94e9754 100644 --- a/charts/alfresco-transform-service/templates/deployment-filestore.yaml +++ b/charts/alfresco-transform-service/templates/deployment-filestore.yaml @@ -11,7 +11,7 @@ spec: matchLabels: {{- include "alfresco-transform-service.filestore.selectorLabels" . | nindent 6 }} strategy: - type: RollingUpdate + type: {{ .Values.filestore.strategy.type }} rollingUpdate: {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} template: @@ -50,7 +50,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumes: - {{- include "data_volume" .Values.filestore | nindent 8 }} + {{- include "alfresco-common.data_volume" .Values.filestore | nindent 8 }} {{- with .Values.filestore.volumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml b/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml new file mode 100644 index 00000000..eb8f06e3 --- /dev/null +++ b/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml @@ -0,0 +1,23 @@ +--- +suite: test filestore deployment features +templates: + - deployment-filestore.yaml + - config-filestore.yaml + +tests: + - it: should render default strategy type + asserts: + - equal: + path: spec.strategy.type + value: RollingUpdate + template: deployment-filestore.yaml + - it: should render overridden strategy type + set: + filestore: + strategy: + type: Recreate + asserts: + - equal: + path: spec.strategy.type + value: Recreate + template: deployment-filestore.yaml diff --git a/charts/alfresco-transform-service/values.yaml b/charts/alfresco-transform-service/values.yaml index 2e16a7f3..a7aaea78 100644 --- a/charts/alfresco-transform-service/values.yaml +++ b/charts/alfresco-transform-service/values.yaml @@ -814,6 +814,9 @@ filestore: subPath: "alfresco-content-services/filestore-data" volumes: [] volumeMounts: [] + strategy: + # -- Custom strategy for filestore deployment + type: RollingUpdate messageBroker: # -- Activemq connection url (e.g. failover:(nio://my-broker:61616)?timeout=3000&jms.useCompression=true) url: null