summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/values.yaml
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2022-02-15 08:27:57 +0000
committerFiachra Corcoran <fiachra.corcoran@est.tech>2022-04-23 08:40:22 +0000
commit368aced4fe43867012206eaad4560d11b1b86672 (patch)
treea3ce46257936674990df01e600cc4e1ce979812c /kubernetes/policy/values.yaml
parent8f95be29e36be0137463c056660dd11e0d20c171 (diff)
[POLICY] Changes for postgresql
Added postgres and to Chart.yaml and values.yaml Changed policy job to create dbs in posgres if used Issue-ID: POLICY-2715 Change-Id: Ia81b56faad85cdcdb261c2f369887dad3eee092d Signed-off-by: saul.gill <saul.gill@est.tech> Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
Diffstat (limited to 'kubernetes/policy/values.yaml')
-rwxr-xr-xkubernetes/policy/values.yaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml
index 6ef71c1e2b..a315bc251c 100755
--- a/kubernetes/policy/values.yaml
+++ b/kubernetes/policy/values.yaml
@@ -28,6 +28,14 @@ global:
name: &policy-mariadb policy-mariadb
internalPort: 3306
prometheusEnabled: false
+ postgres:
+ localCluster: false
+ service:
+ name: pgset
+ name2: tcp-pgset-primary
+ name3: tcp-pgset-replica
+ container:
+ name: postgres
#################################################################
# Secrets metaconfig
@@ -67,6 +75,19 @@ secrets:
login: '{{ .Values.restServer.policyApiUserName }}'
password: '{{ .Values.restServer.policyApiUserPassword }}'
passwordPolicy: required
+ - uid: pg-root-pass
+ name: &pgRootPassSecretName '{{ include "common.release" . }}-policy-pg-root-pass'
+ type: password
+ externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "policy-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
+ password: '{{ .Values.postgres.config.pgRootpassword }}'
+ policy: generate
+ - uid: pg-user-creds
+ name: &pgUserCredsSecretName '{{ include "common.release" . }}-policy-pg-user-creds'
+ type: basicAuth
+ externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "policy-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
+ login: '{{ .Values.postgres.config.pgUserName }}'
+ password: '{{ .Values.postgres.config.pgUserPassword }}'
+ passwordPolicy: generate
db: &dbSecretsHook
credsExternalSecret: *dbSecretName
@@ -181,6 +202,31 @@ mariadb-galera:
serviceAccount:
nameOverride: *policy-mariadb
+postgresImage: library/postgres:latest
+# application configuration override for postgres
+postgres:
+ nameOverride: &postgresName policy-postgres
+ service:
+ name: *postgresName
+ name2: policy-pg-primary
+ name3: policy-pg-replica
+ container:
+ name:
+ primary: policy-pg-primary
+ replica: policy-pg-replica
+ persistence:
+ mountSubPath: policy/postgres/data
+ mountInitPath: policy
+ config:
+ pgUserName: policy_user
+ pgDatabase: policyadmin
+ pgUserExternalSecret: *pgUserCredsSecretName
+ pgRootPasswordExternalSecret: *pgRootPassSecretName
+
+readinessCheck:
+ wait_for:
+ - '{{ ternary .Values.postgres.service.name "postgres" .Values.global.postgres.localCluster }}'
+
restServer:
policyPapUserName: policyadmin
policyPapUserPassword: zb!XztG34