From ece49879ab47ad226f0cb0281c82a3ce25dd0bed Mon Sep 17 00:00:00 2001 From: Srishti Thakkar Date: Wed, 7 Oct 2020 12:24:44 +0530 Subject: [PATCH] Issue 250: Not specifying a default storageclass (#253) Signed-off-by: SrishT Co-authored-by: SrishT --- charts/zookeeper/README.md | 2 +- charts/zookeeper/templates/zookeeper.yaml | 6 ++++++ charts/zookeeper/values.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/zookeeper/README.md b/charts/zookeeper/README.md index 31cb3b0cb..b9979a05b 100644 --- a/charts/zookeeper/README.md +++ b/charts/zookeeper/README.md @@ -77,7 +77,7 @@ The following table lists the configurable parameters of the zookeeper chart and | `config.quorumListenOnAllIPs` | Whether Zookeeper server will listen for connections from its peers on all available IP addresses | `false` | | `storageType` | Type of storage that can be used it can take either ephemeral or persistence as value | `persistence` | | `persistence.reclaimPolicy` | Reclaim policy for persistent volumes | `Delete` | -| `persistence.storageClassName` | Storage class for persistent volumes | `standard` | +| `persistence.storageClassName` | Storage class for persistent volumes | `` | | `persistence.volumeSize` | Size of the volume requested for persistent volumes | `20Gi` | | `ephemeral.emptydirvolumesource.medium` | What type of storage medium should back the directory. | `""` | | `ephemeral.emptydirvolumesource.sizeLimit` | Total amount of local storage required for the EmptyDir volume. | `20Gi` | diff --git a/charts/zookeeper/templates/zookeeper.yaml b/charts/zookeeper/templates/zookeeper.yaml index fd359fbb9..e53615abc 100644 --- a/charts/zookeeper/templates/zookeeper.yaml +++ b/charts/zookeeper/templates/zookeeper.yaml @@ -93,9 +93,15 @@ spec: {{- else }} persistence: reclaimPolicy: {{ .Values.persistence.reclaimPolicy }} + {{- if or .Values.persistence.storageClassName .Values.persistence.volumeSize }} spec: + {{- if .Values.persistence.storageClassName }} storageClassName: {{ .Values.persistence.storageClassName }} + {{- end }} + {{- if .Values.persistence.volumeSize }} resources: requests: storage: {{ .Values.persistence.volumeSize }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/zookeeper/values.yaml b/charts/zookeeper/values.yaml index 2254850d9..900145401 100644 --- a/charts/zookeeper/values.yaml +++ b/charts/zookeeper/values.yaml @@ -33,7 +33,7 @@ config: {} storageType: persistence persistence: - storageClassName: standard + storageClassName: ## specifying reclaim policy for PersistentVolumes ## accepted values - Delete / Retain reclaimPolicy: Delete