From c0943dbcd64bd9f0c2c59bd688e6ae87c1973456 Mon Sep 17 00:00:00 2001 From: Tomas Pizarro Date: Tue, 8 Jan 2019 08:52:51 +0100 Subject: [PATCH] [stable/postgresql] Fix syntax error when persistence is disabled and replication enabled (#10428) Signed-off-by: tompizmor --- stable/postgresql/Chart.yaml | 2 +- .../templates/statefulset-slaves.yaml | 9 +++++---- stable/postgresql/templates/statefulset.yaml | 20 +++++++++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index 49d3ae0ed2..6b0af87a50 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 3.9.0 +version: 3.9.1 appVersion: 10.6.0 description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: diff --git a/stable/postgresql/templates/statefulset-slaves.yaml b/stable/postgresql/templates/statefulset-slaves.yaml index 6a20a9ebd3..ae47f703e1 100644 --- a/stable/postgresql/templates/statefulset-slaves.yaml +++ b/stable/postgresql/templates/statefulset-slaves.yaml @@ -144,7 +144,7 @@ spec: {{ end }} {{- if .Values.persistence.enabled }} - name: data - mountPath: /bitnami/postgresql + mountPath: {{ .Values.persistence.mountPath }} {{ end }} {{- if or (.Files.Glob "files/conf.d/*.conf") .Values.extendedConfConfigMap }} - name: postgresql-extended-config @@ -170,6 +170,10 @@ spec: configMap: name: {{ template "postgresql.extendedConfigurationCM" . }} {{- end }} + {{- if not .Values.persistence.enabled }} + - name: data + emptyDir: {} + {{- end }} updateStrategy: type: {{ .Values.updateStrategy.type }} {{- if .Values.persistence.enabled }} @@ -197,8 +201,5 @@ spec: storageClassName: "{{ .Values.persistence.storageClass }}" {{- end }} {{- end }} -{{- else }} - - name: data - emptyDir: {} {{- end }} {{- end }} diff --git a/stable/postgresql/templates/statefulset.yaml b/stable/postgresql/templates/statefulset.yaml index 53df8bccb4..7d6baa4c44 100644 --- a/stable/postgresql/templates/statefulset.yaml +++ b/stable/postgresql/templates/statefulset.yaml @@ -210,22 +210,22 @@ spec: httpGet: path: / port: metrics - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} {{- end }} {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: / port: metrics - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} {{- end }} volumeMounts: {{- if .Values.usePasswordFile }}