From cf18a198f520cce8205a478fde645fb4afef469b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 19 Sep 2022 15:12:10 -0700 Subject: [PATCH] koschei: split stg and prod credentials Signed-off-by: Kevin Fenzi --- roles/openshift-apps/koschei/templates/config-admin.cfg.j2 | 4 ++++ roles/openshift-apps/koschei/templates/config-backend.cfg.j2 | 4 ++++ roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 b/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 index 5e2ca0193e..306908e600 100644 --- a/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-admin.cfg.j2 @@ -6,7 +6,11 @@ config = { "database_config": { "username": "koscheiadmin", +{% if env == 'staging' %} "password": "{{ koscheiadmin_db_password }}", +{% else %} + "password": "{{ koscheiadmin_stg_db_password }}", +{% endif %} }, } diff --git a/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 b/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 index 58411c18ad..ea7475a106 100644 --- a/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 @@ -7,7 +7,11 @@ config = { "database_config": { "host": "{{ koschei_pgsql_hostname }}", "username": "koscheiuser", +{% if env == 'staging' %} + "password": "{{ koscheiuser_stg_db_password }}", +{% else %} "password": "{{ koscheiuser_db_password }}", +{% endif %} "database": "koschei" }, "koji_config": { diff --git a/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 b/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 index ef64f734ec..486eadd357 100644 --- a/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 @@ -6,7 +6,11 @@ config = { "database_config": { "host": "{{ koschei_pgsql_hostname }}", "username": "koscheiuser", +{% if env == 'staging' %} + "password": "{{ koscheiuser_stg_db_password }}", +{% else %} "password": "{{ koscheiuser_db_password }}", +{% endif %} "database": "koschei" }, "koji_config": {