From 327b7121ac8e78fe5edc81d85d15ed147d0a093f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juris=20Pav=C4=BCu=C4=8Denkovs?= Date: Tue, 20 Dec 2022 12:59:19 +0000 Subject: [PATCH] Helm: define engine update strategy in values.yaml (#985) # What this PR does Now it is possible to change engine deployment update strategy in values.yaml. ## Which issue(s) this PR fixes This is due to #334 and #316, as with rolling update, race conditions might happen when there is still an old engine pod running. Co-authored-by: Joey Orlando --- CHANGELOG.md | 1 + helm/oncall/Chart.yaml | 2 +- helm/oncall/templates/engine/deployment.yaml | 5 +---- helm/oncall/values.yaml | 8 ++++++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3120bf88..c6d7642b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Added ability to change engine deployment update strategy via values in helm chart. - removed APNS support - changed the `django-push-notification` library from the `iskhakov` fork to the [`grafana` fork](https://github.com/grafana/django-push-notifications). This new fork basically patches an issue which affected the database migrations of this django app (previously the diff --git a/helm/oncall/Chart.yaml b/helm/oncall/Chart.yaml index 70f7df3c..76ffef88 100644 --- a/helm/oncall/Chart.yaml +++ b/helm/oncall/Chart.yaml @@ -7,7 +7,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.0 +version: 1.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/helm/oncall/templates/engine/deployment.yaml b/helm/oncall/templates/engine/deployment.yaml index 640bb84b..f0848c76 100644 --- a/helm/oncall/templates/engine/deployment.yaml +++ b/helm/oncall/templates/engine/deployment.yaml @@ -10,10 +10,7 @@ spec: matchLabels: {{- include "oncall.engine.selectorLabels" . | nindent 6 }} strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 0 - type: RollingUpdate + {{- toYaml .Values.engine.updateStrategy | nindent 4 }} template: metadata: {{- with .Values.podAnnotations }} diff --git a/helm/oncall/values.yaml b/helm/oncall/values.yaml index a21ce82c..9abb14fc 100644 --- a/helm/oncall/values.yaml +++ b/helm/oncall/values.yaml @@ -29,6 +29,14 @@ engine: # cpu: 100m # memory: 128Mi + ## Deployment update strategy + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 0 + type: RollingUpdate + ## Affinity for pod assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity affinity: {}