[incubator/patroni] fix affinity type (#14797)

* [incubator/patroni] make affinity a Map instead of a String

This brings it in line with community standards for charts

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [incubator/patroni] minor version bump

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [incubator/patroni] fix default affinity value

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [incubator/patroni] add tests for different affinity values

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [incubator/patroni/ci/custom-affinity-values.yaml] fix spacing

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [incubator/patroni] simplify by adding affinityTemplate

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>
This commit is contained in:
Alice
2019-07-16 01:25:23 -07:00
committed by Kubernetes Prow Robot
parent 185df4ad8a
commit a399acce25
4 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: patroni
description: 'Highly available elephant herd: HA PostgreSQL cluster.'
version: 0.12.1
version: 0.13.0
appVersion: 1.4-p16
home: https://github.com/zalando/patroni
sources:
+3 -2
View File
@@ -69,7 +69,7 @@ The following table lists the configurable parameters of the patroni chart and t
| `credentials.admin` | Password of the admin | `cola` |
| `credentials.standby` | Password of the replication user | `pinacolada` |
| `kubernetes.dcs.enable` | Using Kubernetes as DCS | `true` |
| `kubernetes.configmaps.enable` | Using Kubernetes configmaps instead of endpoints | `false` |
| `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` |
@@ -88,7 +88,8 @@ The following table lists the configurable parameters of the patroni chart and t
| `resources` | Any resources you wish to assign to the pod | `{}` |
| `nodeSelector` | Node label to use for scheduling | `{}` |
| `tolerations` | List of node taints to tolerate | `[]` |
| `affinity` | Affinity settings | Preferred on hostname |
| `affinityTemplate` | A template string to use to generate the affinity settings | Anti-affinity preferred on hostname |
| `affinity` | Affinity settings. Overrides `affinityTemplate` if set. | `{}` |
| `persistentVolume.accessModes` | Persistent Volume access modes | `[ReadWriteOnce]` |
| `persistentVolume.annotations` | Annotations for Persistent Volume Claim` | `{}` |
| `persistentVolume.mountPath` | Persistent Volume mount root path | `/home/postgres/pgdata` |
@@ -141,8 +141,13 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ tpl .Values.affinity . | indent 8 }}
{{ .Values.affinity | toYaml | indent 8 }}
{{- else if .Values.affinityTemplate }}
affinity:
{{ tpl .Values.affinityTemplate . | indent 8 }}
{{- end }}
volumes:
- name: patroni-config
secret:
+2 -1
View File
@@ -90,7 +90,7 @@ nodeSelector: {}
tolerations: []
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: |
affinityTemplate: |
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
@@ -100,6 +100,7 @@ affinity: |
matchLabels:
app: {{ template "patroni.name" . }}
release: {{ .Release.Name | quote }}
affinity: {}
rbac:
# Specifies whether RBAC resources should be created