diff --git a/bitnami/postgresql/Chart.yaml b/bitnami/postgresql/Chart.yaml index 3e313295c..c4d2a15d3 100644 --- a/bitnami/postgresql/Chart.yaml +++ b/bitnami/postgresql/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: postgresql -version: 9.7.4 +version: 9.8.0 appVersion: 11.9.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/bitnami/postgresql/README.md b/bitnami/postgresql/README.md index 330463bbc..8cdb2ca13 100644 --- a/bitnami/postgresql/README.md +++ b/bitnami/postgresql/README.md @@ -182,6 +182,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a | `slave.affinity` | Affinity labels for pod assignment (postgresql slave) | `{}` | | `slave.tolerations` | Toleration labels for pod assignment (postgresql slave) | `[]` | | `slave.anotations` | Map of annotations to add to the statefulsets (postgresql slave) | `{}` | +| `slave.resources` | CPU/Memory resource requests/limits override for slaves. Will fallback to `values.resources` if not defined. | `{}` | | `slave.labels` | Map of labels to add to the statefulsets (postgresql slave) | `{}` | | `slave.podAnnotations` | Map of annotations to add to the pods (postgresql slave) | `{}` | | `slave.podLabels` | Map of labels to add to the pods (postgresql slave) | `{}` | diff --git a/bitnami/postgresql/templates/statefulset-slaves.yaml b/bitnami/postgresql/templates/statefulset-slaves.yaml index a011e23d4..d77142fa3 100644 --- a/bitnami/postgresql/templates/statefulset-slaves.yaml +++ b/bitnami/postgresql/templates/statefulset-slaves.yaml @@ -1,4 +1,5 @@ {{- if .Values.replication.enabled }} +{{- $slaveResources := coalesce .Values.slave.resources .Values.resources -}} apiVersion: {{ template "postgresql.statefulset.apiVersion" . }} kind: StatefulSet metadata: @@ -134,8 +135,8 @@ spec: - name: {{ template "postgresql.fullname" . }} image: {{ template "postgresql.image" . }} imagePullPolicy: "{{ .Values.image.pullPolicy }}" - {{- if .Values.resources }} - resources: {{- toYaml .Values.resources | nindent 12 }} + {{- if $slaveResources }} + resources: {{- toYaml $slaveResources | nindent 12 }} {{- end }} {{- if .Values.containerSecurityContext.enabled }} securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} diff --git a/bitnami/postgresql/values-production.yaml b/bitnami/postgresql/values-production.yaml index f5b23a5ec..29b5dbbcc 100644 --- a/bitnami/postgresql/values-production.yaml +++ b/bitnami/postgresql/values-production.yaml @@ -517,6 +517,12 @@ slave: persistence: enabled: true + # Override the resource configuration for slave + resources: {} + # requests: + # memory: 256Mi + # cpu: 250m + ## Configure resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## diff --git a/bitnami/postgresql/values.yaml b/bitnami/postgresql/values.yaml index 33bdaa768..531090d78 100644 --- a/bitnami/postgresql/values.yaml +++ b/bitnami/postgresql/values.yaml @@ -517,11 +517,18 @@ slave: # type: # nodePort: # clusterIP: + ## Whether to enable PostgreSQL slave replicas data Persistent ## persistence: enabled: true + # Override the resource configuration for slave + resources: {} + # requests: + # memory: 256Mi + # cpu: 250m + ## Configure resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ##