From 23cfd2d61b1b48ceecd6945d0035e98719802d6b Mon Sep 17 00:00:00 2001 From: iiTidgex Date: Mon, 23 Jan 2023 08:38:57 +0000 Subject: [PATCH] support for deployment strategy (#196) Co-authored-by: larmitage_wh --- charts/helm-dashboard/README.md | 3 ++- charts/helm-dashboard/templates/deployment.yaml | 2 ++ charts/helm-dashboard/values.yaml | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/charts/helm-dashboard/README.md b/charts/helm-dashboard/README.md index 75a91be..e45b4be 100644 --- a/charts/helm-dashboard/README.md +++ b/charts/helm-dashboard/README.md @@ -71,7 +71,8 @@ The following table lists the configurable parameters of the chart and their def | `dashboard.persistence.accessModes` | Persistent Volume access modes | `["ReadWriteOnce"]` | | `dashboard.persistence.storageClass` | Persistent Volume storage class | `""` | | `dashboard.persistence.size` | Persistent Volume size | `100M` | -| `dashboard.persistence.hostPath` | Set path in case you want to use local host path volumes (not recommended in production) | `""` | +| `dashboard.persistence.hostPath` | Set path in case you want to use local host path volumes (not recommended in production) | `""` +| `updateStrategy.type` | Set up update strategy for helm-dashboard installation. | `RollingUpdate` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/charts/helm-dashboard/templates/deployment.yaml b/charts/helm-dashboard/templates/deployment.yaml index e880700..c38beda 100644 --- a/charts/helm-dashboard/templates/deployment.yaml +++ b/charts/helm-dashboard/templates/deployment.yaml @@ -11,6 +11,7 @@ spec: selector: matchLabels: {{- include "helm-dashboard.selectorLabels" . | nindent 6 }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} template: metadata: {{- with .Values.podAnnotations }} @@ -83,3 +84,4 @@ spec: {{- else }} emptyDir: { } {{- end }} + diff --git a/charts/helm-dashboard/values.yaml b/charts/helm-dashboard/values.yaml index bc73c2d..1ba978d 100644 --- a/charts/helm-dashboard/values.yaml +++ b/charts/helm-dashboard/values.yaml @@ -67,6 +67,20 @@ dashboard: ## Helm Dashboard data Persistent Volume size ## size: 100M + +## @param.updateStrategy.type Set up update strategy for helm-dashboard installation. +## Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to make sure the pods is destroyed first. +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy +## Example: +## updateStrategy: +## type: RollingUpdate +## rollingUpdate: +## maxSurge: 25% +## maxUnavailable: 25% +## +updateStrategy: + type: RollingUpdate + podAnnotations: {} @@ -100,3 +114,4 @@ nodeSelector: {} tolerations: [] affinity: {} +