Skip to content

Commit

Permalink
[stable/stolon]Add support to create a shm volume to increase the siz…
Browse files Browse the repository at this point in the history
…e of this (helm#20416)

* Add support to create a shm volume  to increase the size of this

Signed-off-by: Juan Manuel Vizcaino <juanmanuel.vizcaino@iomed.health>

* Add support to create a shm volume  to increase the size of this

Signed-off-by: Juan Manuel Vizcaino <juanmanuel.vizcaino@iomed.health>

* Signed-off-by: Juan Manuel Vizcaino <juanmanuel.vizcaino@iomed.health>

Fix Readme, by default is disabled.
  • Loading branch information
jmvizcainoio authored Feb 21, 2020
1 parent f009d7d commit 7ac3412
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/stolon/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: stolon
version: 1.5.6
version: 1.5.7
appVersion: 0.13.0
description: Stolon - PostgreSQL cloud native High Availability.
home: https://github.com/sorintlab/stolon
Expand Down
1 change: 1 addition & 0 deletions stable/stolon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Kubernetes is the default store backend. `consul`, `etcdv2` or `etcdv3` can also
| `etcdImage.tag` | `etcd` image tag | `2.3.7` |
| `etcdImage.pullPolicy` | `etcd` image pull policy | `IfNotPresent` |
| `debug` | Debug mode | `false` |
| `shmVolume.enabled` | Enable emptyDir volume for /dev/shm on keepers pods | `false` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
| `persistence.storageClassName` | Storage class name of backing PVC | `""` |
| `persistence.accessModes` | Persistent volumes access modes | `["ReadWriteOnce"]` |
Expand Down
12 changes: 12 additions & 0 deletions stable/stolon/templates/keeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
export STKEEPER_PG_LISTEN_ADDRESS=$POD_IP
export STOLON_DATA=/stolon-data
chown stolon:stolon $STOLON_DATA
{{- if .Values.shmVolume.enabled }}
chmod -R 777 /dev/shm
{{- end }}
exec gosu stolon stolon-keeper --data-dir $STOLON_DATA
env:
- name: POD_NAME
Expand Down Expand Up @@ -117,6 +120,10 @@ spec:
resources:
{{ toYaml .Values.keeper.resources | indent 12 }}
volumeMounts:
{{- if .Values.shmVolume.enabled }}
- name: dshm
mountPath: /dev/shm
{{- end }}
- name: data
mountPath: /stolon-data
{{- if .Values.tls.enabled }}
Expand Down Expand Up @@ -173,6 +180,11 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
{{- if .Values.shmVolume.enabled }}
- name: dshm
emptyDir:
medium: Memory
{{- end }}
{{- if .Values.tls.enabled }}
- name: certs
secret:
Expand Down
4 changes: 4 additions & 0 deletions stable/stolon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ etcdImage:

debug: false

# Enable the creation of a shm volume
shmVolume:
enabled: false

persistence:
enabled: true
## If defined, storageClassName: <storageClass>
Expand Down

0 comments on commit 7ac3412

Please sign in to comment.