mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Enable Kubernetes API for DCS. (#8112)
* Ability to use Kubernetes for DCS. Update spilo image. Signed-off-by: Andrey Voronkov <voronkovaa@gmail.com> * Update README and image version. Signed-off-by: Andrey Voronkov <voronkovaa@gmail.com> * Turn on K8s based DCS on by default. Turn off etcd. Signed-off-by: Andrey Voronkov <voronkovaa@gmail.com> * Update README Signed-off-by: Andrey Voronkov <voronkovaa@gmail.com> * fix pvc claim for patronic and make it optional Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
549b1828f4
commit
10b1d082c3
@@ -1,7 +1,7 @@
|
||||
name: patroni
|
||||
description: 'Highly available elephant herd: HA PostgreSQL cluster.'
|
||||
version: 0.10.0
|
||||
appVersion: 1.4-p7
|
||||
version: 0.11.0
|
||||
appVersion: 1.4-p16
|
||||
home: https://github.com/zalando/patroni
|
||||
sources:
|
||||
- https://github.com/zalando/patroni
|
||||
|
||||
@@ -14,7 +14,6 @@ This directory contains a Kubernetes chart to deploy a five node [Patroni](https
|
||||
|
||||
## Todo
|
||||
* Make namespace configurable
|
||||
* K8S native DCS
|
||||
|
||||
## Chart Details
|
||||
This chart will do the following:
|
||||
@@ -63,14 +62,16 @@ The following table lists the configurable parameters of the patroni chart and t
|
||||
| `nameOverride` | Override the name of the chart | `nil` |
|
||||
| `fullnameOverride` | Override the fullname of the chart | `nil` |
|
||||
| `replicaCount` | Amount of pods to spawn | `5` |
|
||||
| `image.repository` | The image to pull | `registry.opensource.zalan.do/acid/spilo-10` |
|
||||
| `image.tag` | The version of the image to pull | `1.4-p6` |
|
||||
| `image.repository` | The image to pull | `registry.opensource.zalan.do/acid/spilo-10` |
|
||||
| `image.tag` | The version of the image to pull | `1.4-p16` |
|
||||
| `image.pullPolicy` | The pull policy | `IfNotPresent` |
|
||||
| `credentials.superuser` | Password of the superuser | `tea` |
|
||||
| `credentials.admin` | Password of the admin | `cola` |
|
||||
| `credentials.standby` | Password of the replication user | `pinacolada` |
|
||||
| `etcd.enable` | Using etcd as DCS | `true` |
|
||||
| `etcd.deployChart` | Deploy etcd chart | `true` |
|
||||
| `kubernetes.dcs.enable` | Using Kubernetes as DCS | `true` |
|
||||
| `kubernetes.configmaps.enable` | Using Kubernetes configmaps instead of endpoints | `false` |
|
||||
| `etcd.enable` | Using etcd as DCS | `false` |
|
||||
| `etcd.deployChart` | Deploy etcd chart | `false` |
|
||||
| `etcd.host` | Host name of etcd cluster | `nil` |
|
||||
| `etcd.discovery` | Domain name of etcd cluster | `nil` |
|
||||
| `zookeeper.enable` | Using ZooKeeper as DCS | `false` |
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: etcd
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
version: 0.3.9
|
||||
version: 0.6.2
|
||||
- name: zookeeper
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
version: 1.0.0
|
||||
digest: sha256:2cba87a0a23df25d78a0908f4ce9ae27acb0530a5aac430f19a2dbc0778aa4b2
|
||||
generated: 2018-05-14T14:49:09.901956221+02:00
|
||||
digest: sha256:b65cce5b82c3c9971b7551e923e03a9253bcb9771386086a4e75992a9682ca03
|
||||
generated: 2019-01-26T09:48:28.627975698-06:00
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: etcd
|
||||
version: 0.3.9
|
||||
version: 0.6.2
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
condition: etcd.deployChart
|
||||
- name: zookeeper
|
||||
|
||||
@@ -9,7 +9,35 @@ metadata:
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["endpoints", "pods"]
|
||||
verbs: ["patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
# delete is required only for 'patronictl remove'
|
||||
- delete
|
||||
- apiGroups: [""]
|
||||
resources: ["endpoints"]
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
# the following three privileges are necessary only when using endpoints
|
||||
- list
|
||||
- watch
|
||||
# delete is required only for for 'patronictl remove'
|
||||
- delete
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
{{- end }}
|
||||
|
||||
@@ -42,6 +42,18 @@ spec:
|
||||
secretKeyRef:
|
||||
name: {{ template "patroni.fullname" . }}
|
||||
key: password-standby
|
||||
{{- if .Values.kubernetes.dcs.enable }}
|
||||
- name: DCS_ENABLE_KUBERNETES_API
|
||||
value: "true"
|
||||
- name: KUBERNETES_LABELS
|
||||
value: {{ (printf "{ \"app\": \"%s\", \"release\": \"%s\" }" (include "patroni.name" .) .Release.Name) | quote }}
|
||||
- name: KUBERNETES_SCOPE_LABEL
|
||||
value: "app"
|
||||
{{- end }}
|
||||
{{- if .Values.kubernetes.configmaps.enable }}
|
||||
- name: KUBERNETES_USE_CONFIGMAPS
|
||||
value: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.etcd.enable }}
|
||||
{{- if .Values.etcd.deployChart }}
|
||||
- name: ETCD_DISCOVERY_DOMAIN
|
||||
@@ -142,6 +154,11 @@ spec:
|
||||
secretName: {{ .Values.walE.kubernetesSecret }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistentVolume.enabled }}
|
||||
- name: storage-volume
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.persistentVolume.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: storage-volume
|
||||
@@ -166,3 +183,4 @@ spec:
|
||||
storageClassName: "{{ .Values.persistentVolume.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -4,7 +4,7 @@ image:
|
||||
# Image was built from
|
||||
# https://github.com/zalando/spilo/tree/master/postgres-appliance
|
||||
repository: registry.opensource.zalan.do/acid/spilo-10
|
||||
tag: 1.4-p7
|
||||
tag: 1.4-p16
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# Credentials used by Patroni
|
||||
@@ -17,9 +17,14 @@ credentials:
|
||||
|
||||
# Distribution Configuration stores
|
||||
# Please note that only one of the following stores should be enabled.
|
||||
kubernetes:
|
||||
dcs:
|
||||
enable: true
|
||||
configmaps:
|
||||
enable: false
|
||||
etcd:
|
||||
enable: true
|
||||
deployChart: true
|
||||
enable: false
|
||||
deployChart: false
|
||||
# If not deploying etcd chart, fill-in value for etcd service
|
||||
# <service>.<namespace>.svc.cluster.local
|
||||
host:
|
||||
@@ -52,6 +57,7 @@ walE:
|
||||
backupThresholdPercentage: 30
|
||||
|
||||
persistentVolume:
|
||||
enabled: true
|
||||
size: 1G
|
||||
## database data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
@@ -60,7 +66,7 @@ persistentVolume:
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
storageClass: "-"
|
||||
# storageClass: "-"
|
||||
subPath: ""
|
||||
mountPath: "/home/postgres/pgdata"
|
||||
annotations: {}
|
||||
|
||||
Reference in New Issue
Block a user