diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index ce394deb8478..3a5d6b4ec50e 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 0.3.0 +version: 0.3.1 description: Chart for PostgreSQL keywords: - postgresql diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index f70aad3bb9cb..372f5719dbf5 100644 --- a/stable/postgresql/README.md +++ b/stable/postgresql/README.md @@ -52,7 +52,7 @@ The following tables lists the configurable parameters of the PostgresSQL chart | `postgresPassword` | Password for the new user. | random 10 characters | | `postgresDatabase` | Name for new database to create. | `postgres` | | `persistence.enabled` | Use a PVC to persist data | `true` | -| `persistence.storageClass` | Storage class of backing PVC | `generic` | +| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | | `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | | `persistence.size` | Size of data volume | `8Gi` | | `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` | diff --git a/stable/postgresql/templates/pvc.yaml b/stable/postgresql/templates/pvc.yaml index ce71ca3ebc90..c26abdeb11a1 100644 --- a/stable/postgresql/templates/pvc.yaml +++ b/stable/postgresql/templates/pvc.yaml @@ -9,7 +9,14 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" annotations: - volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} + {{- if .Values.persistence.storageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} + {{ else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} + {{- range $key, $value := .Values.persistence.annotations }} + {{ $key }}: {{ $value }} + {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index 0873307130db..7c85037a1fc0 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -24,7 +24,10 @@ imageTag: "9.5.4" ## Persist data to a persitent volume persistence: enabled: true - storageClass: generic + ## If defined, volume.beta.kubernetes.io/storage-class: + ## Default: volume.alpha.kubernetes.io/storage-class: default + ## + # storageClass: accessMode: ReadWriteOnce size: 8Gi