From 8c5ec4ea48f1adedd1a2a462a6830da7c604102e Mon Sep 17 00:00:00 2001 From: Amanda Cameron Date: Fri, 20 Jan 2017 15:07:49 -0500 Subject: [PATCH 1/3] Convert chart postgresql to use the recommended pvc patterns --- stable/postgresql/README.md | 2 +- stable/postgresql/templates/pvc.yaml | 9 ++++++++- stable/postgresql/values.yaml | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index f70aad3bb9cb..edf55de5359a 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` | | `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 From dff6531bcaf7614df9063ec339ecca00bc8d937e Mon Sep 17 00:00:00 2001 From: Adnan Abdulhussein Date: Thu, 26 Jan 2017 19:03:12 -0800 Subject: [PATCH 2/3] document storage class fallback --- stable/postgresql/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index edf55de5359a..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 | `nil` | +| `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` | From 9727596c45f5dc3caa0c0b47c3802e034fbc2d23 Mon Sep 17 00:00:00 2001 From: Adnan Abdulhussein Date: Thu, 26 Jan 2017 19:04:00 -0800 Subject: [PATCH 3/3] bump chart version --- stable/postgresql/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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