From b2627dcdf437fff70bf4ba64d114baf14cfc6389 Mon Sep 17 00:00:00 2001 From: kgudel Date: Mon, 8 Jul 2024 14:44:11 -0400 Subject: [PATCH] make data browser pg tables configurable --- .../src/main/resources/application.conf | 7 +++++ .../config-maps/pgtables-configmap.yaml | 7 +++++ .../templates/deployment.yaml | 30 +++++++++++++++++-- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/data-browser/src/main/resources/application.conf b/data-browser/src/main/resources/application.conf index 4cd8141d4c..430a2710ff 100644 --- a/data-browser/src/main/resources/application.conf +++ b/data-browser/src/main/resources/application.conf @@ -54,12 +54,19 @@ dbconfig { table { 2023 = "modifiedlar2023_snapshot_05012024" + 2023 = ${?MLAR_TABLE_2023} 2022 = "modifiedlar2022_one_year_05012024" + 2022 = ${?MLAR_TABLE_2022} 2021 = "modifiedlar2021_one_year_05012023" + 2021 = ${?MLAR_TABLE_2021} 2020 = "modifiedlar2020_three_year_05012024" + 2020 = ${?MLAR_TABLE_2020} 2019 = "modifiedlar2019_three_year_04122023" + 2019 = ${?MLAR_TABLE_2019} 2018 = "modifiedlar2018_three_year_04052022" + 2018 = ${?MLAR_TABLE_2018} 2017 = "modifiedlar2017_ultimate" + 2017 = ${?MLAR_TABLE_2017} } user = "hmda_user" diff --git a/kubernetes/config-maps/pgtables-configmap.yaml b/kubernetes/config-maps/pgtables-configmap.yaml index d39665e046..efec5db935 100644 --- a/kubernetes/config-maps/pgtables-configmap.yaml +++ b/kubernetes/config-maps/pgtables-configmap.yaml @@ -8,3 +8,10 @@ data: pgtable.historyTableName: "submission_history" pgtable.tsTableName2019: "transmittalsheet2019" pgtable.larTableName2019: "loanapplicationregister2019" + mlartable.2023: "modifiedlar2023_snapshot_05012024" + mlartable.2022: "modifiedlar2022_one_year_05012024" + mlartable.2021: "modifiedlar2021_one_year_05012023" + mlartable.2020: "modifiedlar2020_three_year_05012024" + mlartable.2019: "modifiedlar2019_three_year_04122023" + mlartable.2018: "modifiedlar2018_three_year_04052022" + mlartable.2017: "modifiedlar2017_ultimate" diff --git a/kubernetes/hmda-data-browser-api/templates/deployment.yaml b/kubernetes/hmda-data-browser-api/templates/deployment.yaml index aa45714883..1ea909c5cd 100644 --- a/kubernetes/hmda-data-browser-api/templates/deployment.yaml +++ b/kubernetes/hmda-data-browser-api/templates/deployment.yaml @@ -163,11 +163,35 @@ spec: - name: DATABROWSER_PG_TABLE_2017 value: intentionally_left_blank - name: DATABROWSER_PG_TABLE_2018 - value: modifiedlar2018_three_year_04052022 + valueFrom: + configMapKeyRef: + name: pgtables-configmap + key: mlartable.2018 - name: DATABROWSER_PG_TABLE_2019 - value: modifiedlar2019_one_year_04052022 + valueFrom: + configMapKeyRef: + name: pgtables-configmap + key: mlartable.2019 - name: DATABROWSER_PG_TABLE_2020 - value: modifiedlar2020_one_year_04302022 + valueFrom: + configMapKeyRef: + name: pgtables-configmap + key: mlartable.2020 + - name: DATABROWSER_PG_TABLE_2021 + valueFrom: + configMapKeyRef: + name: pgtables-configmap + key: mlartable.2021 + - name: DATABROWSER_PG_TABLE_2022 + valueFrom: + configMapKeyRef: + name: pgtables-configmap + key: mlartable.2022 + - name: DATABROWSER_PG_TABLE_2023 + valueFrom: + configMapKeyRef: + name: pgtables-configmap + key: mlartable.2023 - name: REDIS_HOSTNAME value: {{.Values.databrowser.redis}} - name: REDIS_PROTOCOL