From e0ee148a3915054b64202cfff0ab8f22f17e98d8 Mon Sep 17 00:00:00 2001
From: Arie Peterson <arie@greenhost.nl>
Date: Tue, 2 Jun 2020 17:29:49 +0200
Subject: [PATCH] Rename postgres values to follow standard pattern

---
 .../templates/deployment-userbackend.yaml          |  8 ++++----
 helmchart/single-sign-on/values.yaml               | 14 ++++++++------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/helmchart/single-sign-on/templates/deployment-userbackend.yaml b/helmchart/single-sign-on/templates/deployment-userbackend.yaml
index 2dde682..b7c9d20 100644
--- a/helmchart/single-sign-on/templates/deployment-userbackend.yaml
+++ b/helmchart/single-sign-on/templates/deployment-userbackend.yaml
@@ -18,11 +18,11 @@ spec:
     spec:
       containers:
         - name: {{ .Chart.Name }}-userbackend-db
-          image: {{ .Values.userbackend.postgresImage }}:{{ .Values.userbackend.postgresTag }}
-          imagePullPolicy: {{ .Values.userbackend.postgresPullPolicy }}
+          image: {{ .Values.userbackend.postgres.image.repository }}:{{ .Values.userbackend.postgres.image.tag }}
+          imagePullPolicy: {{ .Values.userbackend.postgres.image.pullPolicy }}
           env:
             - name: POSTGRES_PASSWORD
-              value: {{ .Values.userbackend.postgresPassword }}
+              value: {{ .Values.userbackend.postgres.password }}
           volumeMounts:
             - name: database
               mountPath: /var/lib/postgresql/data
@@ -35,7 +35,7 @@ spec:
             - name: DATABASE_USER
               value: "postgres"
             - name: DATABASE_PASSWORD
-              value: {{ default .Values.userbackend.postgresPassword }}
+              value: {{ default .Values.userbackend.postgres.password }}
             - name: DATABASE_NAME
               value: "postgres"
             - name: DATABASE_HOST
diff --git a/helmchart/single-sign-on/values.yaml b/helmchart/single-sign-on/values.yaml
index 2e2cf3f..0c2142e 100644
--- a/helmchart/single-sign-on/values.yaml
+++ b/helmchart/single-sign-on/values.yaml
@@ -50,12 +50,14 @@ userbackend:
   password: "YouReallyNeedToChangeThis"
   # username.email is email address of the admin user
   email: "admin@example.net"
-  postgresImage: postgres
-  postgresTag: 11
-  postgresPullPolicy: Always
-  # userbackend.postgresPassword is the root password of the postgress db that is
-  # created and used by the userbackend
-  postgresPassword: "postgres"
+  postgres:
+    image:
+      repository: postgres
+      tag: 11
+      pullPolicy: Always
+    # userbackend.postgres.password is the root password of the
+    # postgress db that is created and used by the userbackend
+    password: "postgres"
   persistence:
     enabled: true
     size: 1Gi
-- 
GitLab