From 80616f0090a32c9516c71ba9f1769ed59e103973 Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Mon, 14 Dec 2020 18:14:31 -0500 Subject: [PATCH] Add redis.storageClassName to permit an override of the storage class (#50) --- K8s/helm/README.md | 1 + K8s/helm/templates/redis-statefulset.yaml | 2 +- K8s/helm/values.yaml | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/K8s/helm/README.md b/K8s/helm/README.md index 5e36064..e9fa74f 100644 --- a/K8s/helm/README.md +++ b/K8s/helm/README.md @@ -93,3 +93,4 @@ $ helm install robot-shop --set openshift=true helm | openshift | false | boolean | If OpenShift additional configuration is applied. | | payment.gateway | null | string | External URL end-point to simulate partial/3rd party traces. | | psp.enabled | false | boolean | Enable Pod Security Policy for clusters with a PSP Admission controller | +| redis.storageClassName | standard | string | Storage class to use with Redis's StatefulSet. The default for EKS is gp2. | diff --git a/K8s/helm/templates/redis-statefulset.yaml b/K8s/helm/templates/redis-statefulset.yaml index ddb4002..ef6e59a 100644 --- a/K8s/helm/templates/redis-statefulset.yaml +++ b/K8s/helm/templates/redis-statefulset.yaml @@ -41,7 +41,7 @@ spec: spec: accessModes: [ "ReadWriteOnce" ] {{ if not .Values.openshift }} - storageClassName: standard + storageClassName: {{ .Values.redis.storageClassName }} volumeMode: Filesystem {{ end }} resources: diff --git a/K8s/helm/values.yaml b/K8s/helm/values.yaml index 80096f1..ce74bf4 100644 --- a/K8s/helm/values.yaml +++ b/K8s/helm/values.yaml @@ -28,3 +28,6 @@ nodeport: false # "special" Openshift. Set to true when deploying to any openshift flavour openshift: false +# Storage class to use with redis statefulset. +redis: + storageClassName: standard