From 4b2c4889adb7c5d44e782895bca731d05ee42b2f Mon Sep 17 00:00:00 2001 From: arielly-parussulo <97965681+arielly-parussulo@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:32:19 +0100 Subject: [PATCH 1/3] Remove default values for rollingUpdate RollingUpdate is an optional property only used when we set the strategy type as "RollingUpdate". If we set the type as "Recreate", this property breaks the deployments wit the following message: Deployment.apps "" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate' It gets more problematic when we use stakater/apps Helm Chart as a subchart for our applications. Helm has a known bug that doesn't allow override values from the subchart. So, if we need to deploy an application with the Recreate strategy, it is not possible as the deployment will always break with the error mentioned above. --- application/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/values.yaml b/application/values.yaml index 3569adb6..636c15eb 100644 --- a/application/values.yaml +++ b/application/values.yaml @@ -92,13 +92,13 @@ deployment: # -- (string) Type of deployment strategy. # @section -- Deployment Parameters type: RollingUpdate - rollingUpdate: + # rollingUpdate: # -- (string) Max unavailable pods during update. # @section -- Deployment Parameters - maxUnavailable: 25% + # maxUnavailable: 25% # -- (string) Max surge pods during update. # @section -- Deployment Parameters - maxSurge: 25% + # maxSurge: 25% # -- (bool) Reload deployment if attached Secret/ConfigMap changes. # @section -- Deployment Parameters reloadOnChange: true From 4692761b3565e0f77542b4b38c527602cd529dd7 Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Mon, 25 Nov 2024 13:36:14 +0100 Subject: [PATCH 2/3] fix: remove docs comments for rollingUpdate --- application/values.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/application/values.yaml b/application/values.yaml index 636c15eb..d26f78a9 100644 --- a/application/values.yaml +++ b/application/values.yaml @@ -93,12 +93,8 @@ deployment: # @section -- Deployment Parameters type: RollingUpdate # rollingUpdate: - # -- (string) Max unavailable pods during update. - # @section -- Deployment Parameters - # maxUnavailable: 25% - # -- (string) Max surge pods during update. - # @section -- Deployment Parameters - # maxSurge: 25% + # maxUnavailable: 25% + # maxSurge: 25% # -- (bool) Reload deployment if attached Secret/ConfigMap changes. # @section -- Deployment Parameters reloadOnChange: true From d0e4ef32bc43e47ff542ef35ff805659a750c69f Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Mon, 25 Nov 2024 13:36:43 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 73e1f9f3..7104a8f4 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,6 @@ helm delete --namespace test my-application | deployment.annotations | object | `nil` | Annotations for Deployment. | | deployment.additionalPodAnnotations | object | `nil` | Additional pod annotations. | | deployment.strategy.type | string | `"RollingUpdate"` | Type of deployment strategy. | -| deployment.strategy.rollingUpdate.maxUnavailable | string | `"25%"` | Max unavailable pods during update. | -| deployment.strategy.rollingUpdate.maxSurge | string | `"25%"` | Max surge pods during update. | | deployment.reloadOnChange | bool | `true` | Reload deployment if attached Secret/ConfigMap changes. | | deployment.nodeSelector | object | `nil` | Select the node where the pods should be scheduled. | | deployment.hostAliases | list | `nil` | Add host aliases to the pods. |