From 4ac5d5669ff120b6db1e7a43551dc50e33cce7cc Mon Sep 17 00:00:00 2001 From: Jonathan Chauncey Date: Fri, 10 Mar 2017 14:20:37 -0500 Subject: [PATCH] fix(influx, grafana): Add logic around pvc storage class Starting with 1.5.* kubernetes does not provision a storage class. This means when using the volume.beta.kubernetes.io/storage-class the underlying persistent volume cannot be provisioned. Instead, we must use the old volume.alpha.kubernetes.io/storage-class which when passed a value will automatically provision the storage class and the underlying pv --- .../charts/grafana/templates/monitor-grafana-pvc.yaml | 6 +++++- .../charts/influxdb/templates/monitor-influxdb-pvc.yaml | 6 +++++- charts/monitor/values.yaml | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/charts/monitor/charts/grafana/templates/monitor-grafana-pvc.yaml b/charts/monitor/charts/grafana/templates/monitor-grafana-pvc.yaml index c97799a..76a7386 100644 --- a/charts/monitor/charts/grafana/templates/monitor-grafana-pvc.yaml +++ b/charts/monitor/charts/grafana/templates/monitor-grafana-pvc.yaml @@ -6,7 +6,11 @@ metadata: labels: heritage: deis annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }} + {{- if .Values.persistence.storageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} + {{- else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} diff --git a/charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml b/charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml index 5adb3c5..22a8d1a 100644 --- a/charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml +++ b/charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml @@ -6,7 +6,11 @@ metadata: labels: heritage: deis annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }} + {{- if .Values.persistence.storageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} + {{- else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} diff --git a/charts/monitor/values.yaml b/charts/monitor/values.yaml index 92b6f19..135d524 100644 --- a/charts/monitor/values.yaml +++ b/charts/monitor/values.yaml @@ -6,7 +6,6 @@ grafana: # limits_memory: "50Mi" persistence: enabled: false - storageClass: standard accessMode: ReadWriteOnce size: 5Gi influxdb: @@ -21,7 +20,6 @@ influxdb: password: "password" persistence: enabled: false - storageClass: standard accessMode: ReadWriteOnce size: 20Gi telegraf: