[stable/consul] Use storageClassName for consul. (#1975)

This commit is contained in:
Guang Ya Liu
2018-01-29 12:06:34 -08:00
committed by k8s-ci-robot
parent ac2333443f
commit 090fd30e47
3 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -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
+7 -6
View File
@@ -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 }}
+8 -2
View File
@@ -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: <storageClass>
## 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