From 090fd30e4765f14d674b0abf4cc7ebfb25ece6f9 Mon Sep 17 00:00:00 2001 From: Guang Ya Liu Date: Tue, 30 Jan 2018 04:06:34 +0800 Subject: [PATCH] [stable/consul] Use storageClassName for consul. (#1975) --- stable/consul/Chart.yaml | 2 +- stable/consul/templates/consul.yaml | 13 +++++++------ stable/consul/values.yaml | 10 ++++++++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/stable/consul/Chart.yaml b/stable/consul/Chart.yaml index 6a41e01040..fd40ea895d 100755 --- a/stable/consul/Chart.yaml +++ b/stable/consul/Chart.yaml @@ -1,6 +1,6 @@ name: consul home: https://github.com/hashicorp/consul -version: 1.2.0 +version: 1.2.1 appVersion: 1.0.0 description: Highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and diff --git a/stable/consul/templates/consul.yaml b/stable/consul/templates/consul.yaml index 0509fd3574..22d33cf87a 100644 --- a/stable/consul/templates/consul.yaml +++ b/stable/consul/templates/consul.yaml @@ -280,12 +280,6 @@ spec: volumeClaimTemplates: - metadata: name: datadir - annotations: - {{- if .Values.StorageClass }} - volume.beta.kubernetes.io/storage-class: {{ .Values.StorageClass | quote }} - {{- else }} - volume.alpha.kubernetes.io/storage-class: default - {{- end }} spec: accessModes: - "ReadWriteOnce" @@ -293,3 +287,10 @@ spec: requests: # upstream recommended max is 700M storage: "{{ .Values.Storage }}" + {{- if .Values.StorageClass }} + {{- if (eq "-" .Values.StorageClass) }} + storageClassName: "" + {{- else }} + storageClassName: "{{ .Values.StorageClass }}" + {{- end }} + {{- end }} diff --git a/stable/consul/values.yaml b/stable/consul/values.yaml index 04f561a60e..c31e394799 100644 --- a/stable/consul/values.yaml +++ b/stable/consul/values.yaml @@ -40,8 +40,14 @@ DisableHostNodeId: false ## Encrypt Gossip traffic EncryptGossip: true -## StorageClass name for use with Persistent Volume Claim (PVC) using beta notations -# StorageClass: +## consul data Persistent Volume Storage Class +## If defined, StorageClassName: +## If set to "-", StorageClassName: "", which disables dynamic provisioning +## If undefined (the default) or set to null, no storageClassName spec is +## set, choosing the default provisioner. (gp2 on AWS, standard on +## GKE, AWS & OpenStack) +## +# StorageClass: "-" ## Setting maxUnavailable will create a pod disruption budget that will prevent ## voluntarty cluster administration from taking down too many consul pods. If