From e31c59ffd22cb59d8c45f1fd9044e127f86a35ca Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo <71768+gionn@users.noreply.github.com> Date: Tue, 20 Aug 2024 17:05:20 +0200 Subject: [PATCH] OPSEXP-2504 Avoid setting rollingUpdate when unnecessary in filestore (#347) --- charts/alfresco-transform-service/Chart.yaml | 2 +- charts/alfresco-transform-service/README.md | 2 +- .../templates/deployment-filestore.yaml | 2 ++ .../tests/deployment-filestore_test.yaml | 9 +++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/alfresco-transform-service/Chart.yaml b/charts/alfresco-transform-service/Chart.yaml index 763628ef..51ed81ae 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.1.0-alpha.0 +version: 2.1.0-alpha.1 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 e4c48bf0..67c878be 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.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) +![Version: 2.1.0-alpha.1](https://img.shields.io/badge/Version-2.1.0--alpha.1-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 diff --git a/charts/alfresco-transform-service/templates/deployment-filestore.yaml b/charts/alfresco-transform-service/templates/deployment-filestore.yaml index f94e9754..687a0027 100644 --- a/charts/alfresco-transform-service/templates/deployment-filestore.yaml +++ b/charts/alfresco-transform-service/templates/deployment-filestore.yaml @@ -12,8 +12,10 @@ spec: {{- include "alfresco-transform-service.filestore.selectorLabels" . | nindent 6 }} strategy: type: {{ .Values.filestore.strategy.type }} + {{- if eq .Values.filestore.strategy.type "RollingUpdate" }} rollingUpdate: {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} + {{- end }} template: metadata: annotations: diff --git a/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml b/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml index eb8f06e3..a8608c4c 100644 --- a/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml +++ b/charts/alfresco-transform-service/tests/deployment-filestore_test.yaml @@ -11,6 +11,12 @@ tests: path: spec.strategy.type value: RollingUpdate template: deployment-filestore.yaml + - equal: + path: spec.strategy.rollingUpdate + value: + maxSurge: 1 + maxUnavailable: 0 + template: deployment-filestore.yaml - it: should render overridden strategy type set: filestore: @@ -21,3 +27,6 @@ tests: path: spec.strategy.type value: Recreate template: deployment-filestore.yaml + - notExists: + path: spec.strategy.rollingUpdate + template: deployment-filestore.yaml