From dc013bd1f1e6f004253af6311b1a366e55213a1f Mon Sep 17 00:00:00 2001 From: Remington Reackhof Date: Mon, 9 Sep 2019 11:47:20 -0500 Subject: [PATCH] [stable/memcached] Add updateStrategy configuration option (#16358) * [stable/memcached] Add updateStrategy configuration option Signed-off-by: Remington Reackhof * [stable/memcached] Set specific keys for updateStrategy to follow convention Signed-off-by: Remington Reackhof * [stable/memcached] Fix README to reflect updateStrategy.type value requirement Signed-off-by: Remington Reackhof Signed-off-by: Marius Voila --- stable/memcached/Chart.yaml | 2 +- stable/memcached/README.md | 1 + stable/memcached/templates/statefulset.yaml | 5 +++++ stable/memcached/values.yaml | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/stable/memcached/Chart.yaml b/stable/memcached/Chart.yaml index c4a8c47735f0..7c88d111341a 100644 --- a/stable/memcached/Chart.yaml +++ b/stable/memcached/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: memcached -version: 2.9.0 +version: 2.10.0 appVersion: 1.5.12 description: Free & open source, high-performance, distributed memory object caching system. diff --git a/stable/memcached/README.md b/stable/memcached/README.md index 872e6092bc19..056e1a8d8d10 100644 --- a/stable/memcached/README.md +++ b/stable/memcached/README.md @@ -62,6 +62,7 @@ The following table lists the configurable parameters of the Memcached chart and | `securityContext.enabled` | Enable security context | `true` | | `securityContext.fsGroup` | Group ID for the container | `1001` | | `securityContext.runAsUser`| User ID for the container | `1001` | +| `updateStrategy.type` | Update strategy for the StatefulSet/Deployment | `RollingUpdate` | The above parameters map to `memcached` params. For more information please refer to the [Memcached documentation](https://github.com/memcached/memcached/wiki/ConfiguringServer). diff --git a/stable/memcached/templates/statefulset.yaml b/stable/memcached/templates/statefulset.yaml index 0eb5ced2069c..bd638cfc7143 100644 --- a/stable/memcached/templates/statefulset.yaml +++ b/stable/memcached/templates/statefulset.yaml @@ -119,3 +119,8 @@ spec: affinity: {{ toYaml . | trim | indent 8}} {{- end }} + updateStrategy: + type: {{ .Values.updateStrategy.type }} + {{- if (eq "Recreate" .Values.updateStrategy.type) }} + rollingUpdate: null + {{- end }} diff --git a/stable/memcached/values.yaml b/stable/memcached/values.yaml index 6ab55619a1cc..98f1376b4c9b 100644 --- a/stable/memcached/values.yaml +++ b/stable/memcached/values.yaml @@ -42,6 +42,12 @@ serviceAnnotations: {} ## StatefulSet or Deployment kind: StatefulSet +## Update Strategy for the StatefulSet or Deployment +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment +updateStrategy: + type: RollingUpdate + ## Configure resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ##