Skip to content

Commit 4ac5d56

Browse files
author
Jonathan Chauncey
committed
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
1 parent 2e62180 commit 4ac5d56

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

charts/monitor/charts/grafana/templates/monitor-grafana-pvc.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ metadata:
66
labels:
77
heritage: deis
88
annotations:
9-
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }}
9+
{{- if .Values.persistence.storageClass }}
10+
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
11+
{{- else }}
12+
volume.alpha.kubernetes.io/storage-class: default
13+
{{- end }}
1014
spec:
1115
accessModes:
1216
- {{ .Values.persistence.accessMode | quote }}

charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ metadata:
66
labels:
77
heritage: deis
88
annotations:
9-
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }}
9+
{{- if .Values.persistence.storageClass }}
10+
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
11+
{{- else }}
12+
volume.alpha.kubernetes.io/storage-class: default
13+
{{- end }}
1014
spec:
1115
accessModes:
1216
- {{ .Values.persistence.accessMode | quote }}

charts/monitor/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ grafana:
66
# limits_memory: "50Mi"
77
persistence:
88
enabled: false
9-
storageClass: standard
109
accessMode: ReadWriteOnce
1110
size: 5Gi
1211
influxdb:
@@ -21,7 +20,6 @@ influxdb:
2120
password: "password"
2221
persistence:
2322
enabled: false
24-
storageClass: standard
2523
accessMode: ReadWriteOnce
2624
size: 20Gi
2725
telegraf:

0 commit comments

Comments
 (0)