From 6ee5ff6358fa82be5227f2faf6fbba6a3995e6fc Mon Sep 17 00:00:00 2001 From: Jeroen Castelein Date: Wed, 18 Mar 2020 01:46:13 +0100 Subject: [PATCH] [stable/redis-ha] Make emptyDir configurable from values (#21489) Signed-off-by: Jeroen Castelein --- stable/redis-ha/Chart.yaml | 2 +- stable/redis-ha/README.md | 2 ++ stable/redis-ha/templates/redis-ha-statefulset.yaml | 3 ++- stable/redis-ha/templates/redis-haproxy-deployment.yaml | 6 ++++-- stable/redis-ha/values.yaml | 3 +++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/stable/redis-ha/Chart.yaml b/stable/redis-ha/Chart.yaml index a086f33db0eb..4af554fcfe5a 100644 --- a/stable/redis-ha/Chart.yaml +++ b/stable/redis-ha/Chart.yaml @@ -6,7 +6,7 @@ keywords: - redis - keyvalue - database -version: 4.4.1 +version: 4.4.2 appVersion: 5.0.6 description: Highly available Kubernetes implementation of Redis icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png diff --git a/stable/redis-ha/README.md b/stable/redis-ha/README.md index b127ad8f7604..ba93ce0f94c0 100644 --- a/stable/redis-ha/README.md +++ b/stable/redis-ha/README.md @@ -88,6 +88,7 @@ The following table lists the configurable parameters of the Redis chart and the | `persistentVolume.size` | Size for the volume | 10Gi | | `persistentVolume.annotations` | Annotations for the volume | `{}` | | `persistentVolume.reclaimPolicy` | Method used to reclaim an obsoleted volume. `Delete` or `Retain` | `""` | +| `emptyDir` | Configuration of `emptyDir`, used only if persistentVolume is disabled and no hostPath specified | `{}` | | `exporter.enabled` | If `true`, the prometheus exporter sidecar is enabled | `false` | | `exporter.image` | Exporter image | `oliver006/redis_exporter` | | `exporter.tag` | Exporter tag | `v0.31.0` | @@ -111,6 +112,7 @@ The following table lists the configurable parameters of the Redis chart and the | `haproxy.customConfig` | Allows for custom config-haproxy.cfg file to be applied. If this is used then default config will be overwriten | `` | | `haproxy.extraConfig` | Allows to place any additional configuration section to add to the default config-haproxy.cfg | `` | | `haproxy.resources` | HAProxy resources | `{}` | +| `haproxy.emptyDir` | Configuration of `emptyDir` | `{}` | | `haproxy.service.type` | HAProxy service type "ClusterIP", "LoadBalancer" or "NodePort" | `ClusterIP` | | `haproxy.service.nodePort` | HAProxy service nodePort value (haproxy.service.type must be NodePort) | not set | | `haproxy.service.annotations` | HAProxy service annotations | `{}` | diff --git a/stable/redis-ha/templates/redis-ha-statefulset.yaml b/stable/redis-ha/templates/redis-ha-statefulset.yaml index 0f2a2ba4116d..65550968b55d 100644 --- a/stable/redis-ha/templates/redis-ha-statefulset.yaml +++ b/stable/redis-ha/templates/redis-ha-statefulset.yaml @@ -314,5 +314,6 @@ spec: path: {{ tpl .Values.hostPath.path .}} {{- else }} - name: data - emptyDir: {} + emptyDir: +{{ toYaml .Values.emptyDir | indent 10 }} {{- end }} diff --git a/stable/redis-ha/templates/redis-haproxy-deployment.yaml b/stable/redis-ha/templates/redis-haproxy-deployment.yaml index 05c137109c47..6348e1865ad0 100644 --- a/stable/redis-ha/templates/redis-haproxy-deployment.yaml +++ b/stable/redis-ha/templates/redis-haproxy-deployment.yaml @@ -143,7 +143,9 @@ spec: configMap: name: {{ template "redis-ha.fullname" . }}-configmap - name: shared-socket - emptyDir: {} + emptyDir: +{{ toYaml .Values.haproxy.emptyDir | indent 10 }} - name: data - emptyDir: {} + emptyDir: +{{ toYaml .Values.haproxy.emptyDir | indent 10 }} {{- end }} diff --git a/stable/redis-ha/values.yaml b/stable/redis-ha/values.yaml index e4d0ee021841..aca78f135a79 100644 --- a/stable/redis-ha/values.yaml +++ b/stable/redis-ha/values.yaml @@ -55,6 +55,7 @@ haproxy: annotations: {} resources: {} + emptyDir: {} ## Enable sticky sessions to Redis nodes via HAProxy ## Very useful for long-living connections as in case of Sentry for example stickyBalancing: false @@ -357,3 +358,5 @@ hostPath: # change the owner of the hostPath folder to the user defined in the # security context chown: true + +emptyDir: {}