diff options
author | BorislavG <Borislav.Glozman@amdocs.com> | 2018-05-17 16:03:33 +0000 |
---|---|---|
committer | BorislavG <Borislav.Glozman@amdocs.com> | 2018-05-17 16:05:45 +0000 |
commit | 3f10201646b82c19acbb02d29b04d8a7193361d7 (patch) | |
tree | cb28856ecb996b07894d82b2e709935d347c27f2 /kubernetes/common | |
parent | cf27a20627d591faec9f6520ae06531e85755ca6 (diff) |
Fix postgres startup
Change-Id: I411447a908c16b3769a5819d8812a93b58623af6
Issue-ID: OOM-1094
Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
Diffstat (limited to 'kubernetes/common')
-rw-r--r-- | kubernetes/common/postgres/templates/statefulset.yaml | 9 | ||||
-rw-r--r-- | kubernetes/common/postgres/values.yaml | 6 |
2 files changed, 10 insertions, 5 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 } } diff --git a/kubernetes/common/postgres/values.yaml b/kubernetes/common/postgres/values.yaml index a570028900..7552d2490c 100644 --- a/kubernetes/common/postgres/values.yaml +++ b/kubernetes/common/postgres/values.yaml @@ -55,7 +55,7 @@ affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 30 + initialDelaySeconds: 300 periodSeconds: 10 timeoutSeconds: 5 # necessary to disable liveness probe when setting breakpoints @@ -63,13 +63,13 @@ liveness: enabled: true readiness: - initialDelaySeconds: 5 + initialDelaySeconds: 10 periodSeconds: 10 ## Persist data to a persitent volume persistence: enabled: true - + ## A manually managed Persistent Volume and Claim ## Requires persistence.enabled: true ## If defined, PVC must be created manually before volume will be bound |