Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Use storageClassName for patroni. (#2044)
Browse files Browse the repository at this point in the history
* [incubator/patroni] Use storageClassName for patroni.

* Fix requirements.lock

* Update Chart.yaml
  • Loading branch information
gyliu513 authored and feikesteenbergen committed Aug 22, 2019
1 parent 1f246d2 commit b69977f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion incubator/patroni/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: patroni
description: 'Highly available elephant herd: HA PostgreSQL cluster.'
version: 0.8.1
version: 0.9.0
appVersion: 1.4-p7
home: https://github.com/zalando/patroni
sources:
Expand Down
12 changes: 7 additions & 5 deletions incubator/patroni/templates/statefulset-patroni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ spec:
- metadata:
name: storage-volume
annotations:
{{- if .Values.persistentVolume.storageClass }}
volume.beta.kubernetes.io/storage-class: "{{ .Values.persistentVolume.storageClass }}"
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
{{- if .Values.persistentVolume.annotations }}
{{ toYaml .Values.persistentVolume.annotations | indent 8 }}
{{- end }}
Expand All @@ -165,3 +160,10 @@ spec:
resources:
requests:
storage: "{{ .Values.persistentVolume.size }}"
{{- if .Values.persistentVolume.storageClass }}
{{- if (eq "-" .Values.persistentVolume.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistentVolume.storageClass }}"
{{- end }}
{{- end }}
9 changes: 8 additions & 1 deletion incubator/patroni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ walE:

persistentVolume:
size: 1G
storageClass: ""
## 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: "-"
subPath: ""
mountPath: "/home/postgres/pgdata"
annotations: {}
Expand Down

0 comments on commit b69977f

Please sign in to comment.