Skip to content

Commit

Permalink
fix(influx, grafana): Add logic around pvc storage class
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jonathan Chauncey committed Mar 14, 2017
1 parent 2e62180 commit 4ac5d56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 0 additions & 2 deletions charts/monitor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ grafana:
# limits_memory: "50Mi"
persistence:
enabled: false
storageClass: standard
accessMode: ReadWriteOnce
size: 5Gi
influxdb:
Expand All @@ -21,7 +20,6 @@ influxdb:
password: "password"
persistence:
enabled: false
storageClass: standard
accessMode: ReadWriteOnce
size: 20Gi
telegraf:
Expand Down

0 comments on commit 4ac5d56

Please sign in to comment.