From 1dbd2a203831610986e4998f34e8149cc069bf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Thu, 29 Apr 2021 09:40:50 +0200 Subject: [PATCH] [bitnami/postgresql] SHM: remove size limit on the emptyDir. (#6232) The size of this emptyDir in memory flavor will count against your container's memory limit, so no need to have a separate limit. A lot of parallel queries on huge workloads can be greater than 1GB. --- bitnami/postgresql/Chart.yaml | 2 +- bitnami/postgresql/README.md | 1 + bitnami/postgresql/templates/statefulset.yaml | 4 +++- bitnami/postgresql/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bitnami/postgresql/Chart.yaml b/bitnami/postgresql/Chart.yaml index a933643343..8cc86546b0 100644 --- a/bitnami/postgresql/Chart.yaml +++ b/bitnami/postgresql/Chart.yaml @@ -26,4 +26,4 @@ name: postgresql sources: - https://github.com/bitnami/bitnami-docker-postgresql - https://www.postgresql.org/ -version: 10.3.18 +version: 10.4.0 diff --git a/bitnami/postgresql/README.md b/bitnami/postgresql/README.md index 63d3605bb8..27e92ceaad 100644 --- a/bitnami/postgresql/README.md +++ b/bitnami/postgresql/README.md @@ -152,6 +152,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a | `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | | `shmVolume.enabled` | Enable emptyDir volume for /dev/shm for primary and read replica(s) Pod(s) | `true` | | `shmVolume.chmod.enabled` | Run at init chmod 777 of the /dev/shm (ignored if `volumePermissions.enabled` is `false`) | `true` | +| `shmVolume.sizeLimit` | Set size limit for /dev/shm | `nil` | | `persistence.enabled` | Enable persistence using PVC | `true` | | `persistence.existingClaim` | Provide an existing `PersistentVolumeClaim`, the value is evaluated as a template. | `nil` | | `persistence.mountPath` | Path to mount the volume at | `/bitnami/postgresql` | diff --git a/bitnami/postgresql/templates/statefulset.yaml b/bitnami/postgresql/templates/statefulset.yaml index f8163fd99f..e806ad0290 100644 --- a/bitnami/postgresql/templates/statefulset.yaml +++ b/bitnami/postgresql/templates/statefulset.yaml @@ -573,7 +573,9 @@ spec: - name: dshm emptyDir: medium: Memory - sizeLimit: 1Gi +{{- with .Values.shmVolume.sizeLimit }} + sizeLimit: {{ . }} +{{- end }} {{- end }} {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }} - name: data diff --git a/bitnami/postgresql/values.yaml b/bitnami/postgresql/values.yaml index 82ce092344..a4e0b79ae3 100644 --- a/bitnami/postgresql/values.yaml +++ b/bitnami/postgresql/values.yaml @@ -375,6 +375,8 @@ shmVolume: ## chmod: enabled: true + ## Set this to enable a size limit on the shm tmpfs. Note that the size of the tmpfs counts against container's memory limit + # sizeLimit: 1Gi ## PostgreSQL data Persistent Volume Storage Class ## If defined, storageClassName: