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

Commit

Permalink
[stable/mariadb] Use storageClassName for mariadb. (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyliu513 authored and mgoodness committed Sep 7, 2017
1 parent f2a6dd9 commit aa0380f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
13 changes: 7 additions & 6 deletions stable/mariadb/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
{{- 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 }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions stable/mariadb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ persistence:
## If defined, PVC must be created manually before volume will be bound
# existingClaim:

## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
## mariadb 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: "-"
accessMode: ReadWriteOnce
size: 8Gi

Expand Down

0 comments on commit aa0380f

Please sign in to comment.