mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[incubator/patroni] Make nodeSelector and storage-class configurable (#880)
* Make StatefulSet nodeSelector configurable * Make storage-class configurable * Add NodeSelector, StorageClass to README * Use persistentVolume pattern * Add commented-out `NodeSelector` example * update chart.yaml and requirements.lock * [incubator/patroni] add appVersion and github ids
This commit is contained in:
committed by
Vic Iglesias
parent
09892a393d
commit
3eeefd3a23
@@ -1,12 +1,13 @@
|
||||
name: patroni
|
||||
description: "Highly available elephant herd: HA PostgreSQL cluster."
|
||||
version: 0.2.0
|
||||
version: 0.2.1
|
||||
appVersion: 1.0-p5
|
||||
home: https://github.com/zalando/patroni
|
||||
sources:
|
||||
- https://github.com/zalando/patroni
|
||||
- https://github.com/zalando/spilo
|
||||
maintainers:
|
||||
- name: Team ACID @ Zalando SE
|
||||
- name: alexeyklyukin
|
||||
email: team-acid@zalando.de
|
||||
- name: Team Teapot @ Zalando SE
|
||||
- name: linki
|
||||
email: team-teapot@zalando.de
|
||||
|
||||
@@ -57,15 +57,21 @@ The following tables lists the configurable parameters of the patroni chart and
|
||||
| `Spilo.Version` | Container image tag | `1.0-p5` |
|
||||
| `ImagePullPolicy` | Container pull policy | `IfNotPresent` |
|
||||
| `Replicas` | k8s statefulset replicas | `5` |
|
||||
| `NodeSelector` | nodeSelector map | Empty |
|
||||
| `Component` | k8s selector key | `patroni` |
|
||||
| `Resources.Cpu` | container requested cpu | `100m` |
|
||||
| `Resources.Memory` | container requested memory | `512Mi` |
|
||||
| `Resources.Storage` | Persistent volume size | `1Gi` |
|
||||
| `Credentials.Superuser` | password for the superuser | `tea` |
|
||||
| `Credentials.Admin` | password for the admin user | `cola` |
|
||||
| `Credentials.Standby` | password for the replication user | `pinacolada` |
|
||||
| `Etcd.Host` | host name of etcd cluster | not used (Etcd.Discovery is used instead) |
|
||||
| `Etcd.Discovery` | domain name of etcd cluster | `<release-name>-etcd.<namespace>.svc.cluster.local` |
|
||||
| `persistentVolume.accessModes` | Persistent Volume access modes | `[ReadWriteOnce]` |
|
||||
| `persistentVolume.annotations` | Annotations for Persistent Volume Claim` | `{}` |
|
||||
| `persistentVolume.mountPath` | Persistent Volume mount root path | `/home/postgres/pgdata` |
|
||||
| `persistentVolume.size` | Persistent Volume size | `2Gi` |
|
||||
| `persistentVolume.storageClass` | Persistent Volume Storage Class | `volume.alpha.kubernetes.io/storage-class: default` |
|
||||
| `persistentVolume.subPath` | Subdirectory of Persistent Volume to mount | `""` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
dependencies:
|
||||
- condition: ""
|
||||
enabled: false
|
||||
import-values: null
|
||||
name: etcd
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
tags: null
|
||||
version: 0.2.0
|
||||
digest: sha256:252c24b9a22eb235857447e235fbfa89ea9e13ebffedede26c087540315a88c5
|
||||
generated: 2017-03-24T16:20:33.196803732Z
|
||||
digest: sha256:ed1ddf10ed804801e6b01afd2533dcf3ef4b0c6000513110ff78c1430934c2a1
|
||||
generated: 2017-06-08T12:51:07.354627568+02:00
|
||||
|
||||
@@ -19,6 +19,12 @@ spec:
|
||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
||||
component: "{{.Release.Name}}-{{.Values.Component}}"
|
||||
spec:
|
||||
{{if .Values.NodeSelector }}
|
||||
nodeSelector:
|
||||
{{range $key, $value := .Values.NodeSelector}}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
containers:
|
||||
- name: spilo
|
||||
image: "{{ .Values.Spilo.Image }}:{{ .Values.Spilo.Version }}"
|
||||
@@ -64,8 +70,9 @@ spec:
|
||||
cpu: "{{.Values.Resources.Cpu}}"
|
||||
memory: "{{.Values.Resources.Memory}}"
|
||||
volumeMounts:
|
||||
- name: pgdata
|
||||
mountPath: /home/postgres/pgdata
|
||||
- name: storage-volume
|
||||
mountPath: "{{ .Values.persistentVolume.mountPath }}"
|
||||
subPath: "{{ .Values.persistentVolume.subPath }}"
|
||||
- mountPath: /etc/patroni
|
||||
name: patroni-config
|
||||
readOnly: true
|
||||
@@ -73,13 +80,27 @@ spec:
|
||||
- name: patroni-config
|
||||
secret:
|
||||
secretName: {{ template "fullname" . }}
|
||||
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: pgdata
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: default
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: "{{.Values.Resources.Storage}}"
|
||||
- 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 }}
|
||||
labels:
|
||||
heritage: {{.Release.Service | quote }}
|
||||
release: {{.Release.Name | quote }}
|
||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
||||
component: "{{.Release.Name}}-{{.Values.Component}}"
|
||||
spec:
|
||||
accessModes:
|
||||
{{ toYaml .Values.persistentVolume.accessModes | indent 8 }}
|
||||
resources:
|
||||
requests:
|
||||
storage: "{{ .Values.persistentVolume.size }}"
|
||||
|
||||
@@ -16,7 +16,10 @@ Replicas: 5
|
||||
Resources:
|
||||
Cpu: 100m
|
||||
Memory: 512Mi
|
||||
Storage: 1Gi
|
||||
|
||||
# Node selector for Patroni pods
|
||||
#NodeSelector:
|
||||
# cloud.google.com/gke-nodepool: highmem-pool
|
||||
|
||||
# Credentials used by Patroni
|
||||
# * more information: https://github.com/zalando/patroni/blob/master/docs/SETTINGS.rst#postgresql
|
||||
@@ -29,3 +32,13 @@ Credentials:
|
||||
Etcd:
|
||||
Host: # fill-in value for etcd host (etcd.default.svc.cluster.local), leave blank to use the discovery parameter
|
||||
Discovery: # leave blank to use vendored etcd chart
|
||||
|
||||
persistentVolume:
|
||||
size: 1G
|
||||
storageClass: ""
|
||||
subPath: ""
|
||||
mountPath: "/home/postgres/data"
|
||||
annotations: {}
|
||||
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
Reference in New Issue
Block a user