Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Use storageClassName for grafana. (#1921)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyliu513 authored and mgoodness committed Sep 4, 2017
1 parent 227a84b commit 6c067a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion stable/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: grafana
version: 0.4.4
version: 0.4.5
description: The leading tool for querying and visualizing time series and metrics.
home: https://grafana.net
icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png
Expand Down
12 changes: 7 additions & 5 deletions stable/grafana/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
{{- if .Values.server.persistentVolume.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.server.persistentVolume.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
{{- if .Values.server.persistentVolume.annotations }}
{{ toYaml .Values.server.persistentVolume.annotations | indent 4 }}
{{- end }}
Expand All @@ -27,5 +22,12 @@ spec:
resources:
requests:
storage: {{ .Values.server.persistentVolume.size | quote }}
{{- if .Values.server.persistentVolume.storageClass }}
{{- if (eq "-" .Values.server.persistentVolume.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.server.persistentVolume.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
11 changes: 7 additions & 4 deletions stable/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ server:
##
size: 1Gi

## Data Persistent Volume Storage Class
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
## grafana 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:
# storageClass: "-"

## Subdirectory of data Persistent Volume to mount
## Useful if the volume's root directory is not empty
Expand Down

0 comments on commit 6c067a1

Please sign in to comment.