summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres/templates/statefulset.yaml
diff options
context:
space:
mode:
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>2018-05-17 18:55:54 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-17 18:55:54 +0000
commit1126b3284a20c8b017b85ff504624fe9c20b0522 (patch)
tree56edce9ca944ab37585730d452b08f98d67ad303 /kubernetes/common/postgres/templates/statefulset.yaml
parent8b0a6e9b3f4c07931041c5e5e80be09b53cab719 (diff)
parent3f10201646b82c19acbb02d29b04d8a7193361d7 (diff)
Merge "Fix postgres startup"
Diffstat (limited to 'kubernetes/common/postgres/templates/statefulset.yaml')
-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 } }