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

Commit

Permalink
[stable/postgresql] Use storageClassName for postgresql. (#2005)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyliu513 authored and mgoodness committed Sep 10, 2017
1 parent 6b76ca7 commit 169d8e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion stable/postgresql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: postgresql
version: 0.8.2
version: 0.8.3
description: Object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.
keywords:
- postgresql
Expand Down
13 changes: 7 additions & 6 deletions stable/postgresql/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/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,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
## database 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
subPath: "postgresql-db"
Expand Down

0 comments on commit 169d8e8

Please sign in to comment.