From 8be9e338d23af15c97ec2af76c97429aa96ae86c Mon Sep 17 00:00:00 2001 From: Chris Amert Date: Fri, 23 Oct 2020 14:18:09 -0400 Subject: [PATCH] Allow the 'updateStrategy' of the Daemonset to be configured in Helm This PR enables the 'updateStrategy' of the Daemonset to be configured by Helm parameters. This has two different parameters, one for Linux and one for Windows, following the existing pattern for these variables. The default values are the same as the current defaults; RollingUpdate strategy with maxUnavailable set to 1, so behavior will change only if the user specifies a custom value. --- .../charts/secrets-store-csi-driver/README.md | 2 ++ .../templates/secrets-store-csi-driver-windows.yaml | 2 ++ .../templates/secrets-store-csi-driver.yaml | 2 ++ .../charts/secrets-store-csi-driver/values.yaml | 10 ++++++++++ 4 files changed, 16 insertions(+) diff --git a/manifest_staging/charts/secrets-store-csi-driver/README.md b/manifest_staging/charts/secrets-store-csi-driver/README.md index ffe6e9067..a19d84117 100644 --- a/manifest_staging/charts/secrets-store-csi-driver/README.md +++ b/manifest_staging/charts/secrets-store-csi-driver/README.md @@ -42,6 +42,7 @@ The following table lists the configurable parameters of the csi-secrets-store-p | `linux.livenessProbe.resources` | The resource request/limits for the linux liveness-probe container image | `limits: 100m CPU, 100Mi; requests: 10m CPU, 20Mi` | | `linux.env` | Environment variables to be passed for the daemonset on linux nodes | `[]` | | `linux.priorityClassName` | Indicates the importance of a Pod relative to other Pods. | `""` | +| `linux.updateStrategy` | Configure a custom update strategy for the daemonset on linux nodes | `RollingUpdate with 1 maxUnavailable` | | `windows.image.repository` | Windows image repository | `us.gcr.io/k8s-artifacts-prod/csi-secrets-store/driver` | | `windows.image.pullPolicy` | Windows image pull policy | `IfNotPresent` | | `windows.image.tag` | Windows image tag | `v0.0.16` | @@ -61,6 +62,7 @@ The following table lists the configurable parameters of the csi-secrets-store-p | `windows.livenessProbe.resources` | The resource request/limits for the windows liveness-probe container image | `limits: 200m CPU, 200Mi; requests: 10m CPU, 20Mi` | | `windows.env` | Environment variables to be passed for the daemonset on windows nodes | `[]` | | `windows.priorityClassName` | Indicates the importance of a Pod relative to other Pods. | `""` | +| `windows.updateStrategy` | Configure a custom update strategy for the daemonset on windows nodes | `RollingUpdate with 1 maxUnavailable` | | `logLevel.debug` | Enable debug logging | true | | `livenessProbe.port` | Liveness probe port | `9808` | | `livenessProbe.logLevel` | Liveness probe container logging verbosity level | `2` | diff --git a/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver-windows.yaml b/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver-windows.yaml index 92f57479d..91d5fbb45 100644 --- a/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver-windows.yaml +++ b/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver-windows.yaml @@ -9,6 +9,8 @@ spec: selector: matchLabels: app: {{ template "sscd.name" . }} + updateStrategy: +{{ toYaml .Values.windows.updateStrategy | indent 4 }} template: metadata: {{ include "sscd.labels" . | indent 6 }} diff --git a/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver.yaml b/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver.yaml index 66e6eabd8..34d05d7fb 100644 --- a/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver.yaml +++ b/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver.yaml @@ -9,6 +9,8 @@ spec: selector: matchLabels: app: {{ template "sscd.name" . }} + updateStrategy: +{{ toYaml .Values.linux.updateStrategy | indent 4 }} template: metadata: {{ include "sscd.labels" . | indent 6 }} diff --git a/manifest_staging/charts/secrets-store-csi-driver/values.yaml b/manifest_staging/charts/secrets-store-csi-driver/values.yaml index 15f21b787..19ebbe11c 100644 --- a/manifest_staging/charts/secrets-store-csi-driver/values.yaml +++ b/manifest_staging/charts/secrets-store-csi-driver/values.yaml @@ -42,6 +42,11 @@ linux: cpu: 10m memory: 20Mi + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + kubeletRootDir: /var/lib/kubelet nodeSelector: {} tolerations: [] @@ -93,6 +98,11 @@ windows: cpu: 10m memory: 20Mi + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + kubeletRootDir: C:\var\lib\kubelet nodeSelector: {} tolerations: []