summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres/templates
diff options
context:
space:
mode:
authorBorislavG <Borislav.Glozman@amdocs.com>2018-05-17 16:03:33 +0000
committerBorislavG <Borislav.Glozman@amdocs.com>2018-05-17 16:05:45 +0000
commit3f10201646b82c19acbb02d29b04d8a7193361d7 (patch)
treecb28856ecb996b07894d82b2e709935d347c27f2 /kubernetes/common/postgres/templates
parentcf27a20627d591faec9f6520ae06531e85755ca6 (diff)
Fix postgres startup
Change-Id: I411447a908c16b3769a5819d8812a93b58623af6 Issue-ID: OOM-1094 Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
Diffstat (limited to 'kubernetes/common/postgres/templates')
-rw-r--r--kubernetes/common/postgres/templates/statefulset.yaml9
1 files changed, 7 insertions, 2 deletions
diff --git a/kubernetes/common/postgres/templates/statefulset.yaml b/kubernetes/common/postgres/templates/statefulset.yaml
index c3f86748cb..57bfdbf700 100644
--- a/kubernetes/common/postgres/templates/statefulset.yaml
+++ b/kubernetes/common/postgres/templates/statefulset.yaml
@@ -37,8 +37,13 @@ spec:
- /bin/sh
- -c
- |
- for i in $(seq 0 $(({{ .Values.replicaCount }}-1))); do mkdir -p /podroot/data$i; done
- chmod 777 /podroot/*
+ for i in $(seq 0 $(({{ .Values.replicaCount }}-1))); do
+ if [ ! -d /podroot/data$i ]; then
+ mkdir -p /podroot/data$i;
+ chown 26:26 /podroot/data$i;
+ chmod 700 /podroot/data$i;
+ fi;
+ done
env:
- name: POD_NAME
valueFrom: { fieldRef: { fieldPath: metadata.name } }