diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index d0db0a0da1..2cbce6296b 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 2.4.0 +version: 2.5.0 appVersion: 10.6.0 description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: diff --git a/stable/postgresql/README.md b/stable/postgresql/README.md index 3df90fdd42..374087c37e 100644 --- a/stable/postgresql/README.md +++ b/stable/postgresql/README.md @@ -78,6 +78,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a | `persistence.annotations` | Annotations for the PVC | `{}` | | `resources` | CPU/Memory resource requests/limits | `nil` | | `nodeSelector` | Node labels for pod assignment | `{}` | +| `affinity` | Affinity labels for pod assignment | `{}` | | `tolerations` | Toleration labels for pod assignment | `[]` | | `terminationGracePeriodSeconds` | Seconds the pod needs to terminate gracefully | `nil` | | `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` | diff --git a/stable/postgresql/templates/statefulset-slaves.yaml b/stable/postgresql/templates/statefulset-slaves.yaml index bb84ddfe47..84b1ae0039 100644 --- a/stable/postgresql/templates/statefulset-slaves.yaml +++ b/stable/postgresql/templates/statefulset-slaves.yaml @@ -42,6 +42,10 @@ spec: {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} {{- end }} {{- if .Values.tolerations }} tolerations: diff --git a/stable/postgresql/templates/statefulset.yaml b/stable/postgresql/templates/statefulset.yaml index 68b3c9f26d..b810accb67 100644 --- a/stable/postgresql/templates/statefulset.yaml +++ b/stable/postgresql/templates/statefulset.yaml @@ -41,6 +41,10 @@ spec: {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} {{- end }} {{- if .Values.tolerations }} tolerations: diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index ea313209d6..3aaf7165b2 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -108,10 +108,12 @@ persistence: size: 8Gi annotations: {} -## Node labels and tolerations for pod assignment +## Node, affinity and tolerations labels for pod assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature nodeSelector: {} +affinity: {} tolerations: [] ## Configure resource requests and limits