From f34df50e8927993e0f484cfd15037229e4ffdeb1 Mon Sep 17 00:00:00 2001 From: Francesco Cesareo Date: Mon, 21 Oct 2024 17:19:52 +0200 Subject: [PATCH] externalized enabled --- helm/values-dev.yaml | 9 ++++++--- helm/values-prod.yaml | 9 ++++++--- helm/values-uat.yaml | 9 ++++++--- src/main/resources/application.yaml | 6 +++--- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index b301944..04cf101 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -70,22 +70,25 @@ microservice-chart: CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}' DB_NEXI_POSTGRES_URL: "jdbc:postgresql://db-postgres-ndp.d.db-nodo-pagamenti.com:5444/ndpspct?prepareThreshold=0¤tSchema=NODO4_CFG" DB_NEXI_POSTGRES_USER: "pp_nodo4_cfg" - DB_NEXI_POSTGRES_ENABLED: "false" + DB_NEXI_POSTGRES_ENABLED: "false" # connect to datasource DB_NEXI_POSTGRES_SERVICE_IDENTIFIER: "NDP004DEV" DB_NEXI_POSTGRES_CONNECTION_TIMEOUT: "15000" DB_NEXI_POSTGRES_MAX_LIFETIME: "30000" + DB_NEXI_POSTGRES_WRITE_CACHE_ENABLED: "false" # write cache DB_NEXI_ORACLE_URL: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1522)(HOST=db-nodo-pagamenti.d.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCT_PP_NODO4_CFG))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" DB_NEXI_ORACLE_USER: "NODO4_CFG" - DB_NEXI_ORACLE_ENABLED: "true" + DB_NEXI_ORACLE_ENABLED: "true" # connect to datasource DB_NEXI_ORACLE_SERVICE_IDENTIFIER: "NDP003DEV" DB_NEXI_ORACLE_CONNECTION_TIMEOUT: "15000" DB_NEXI_ORACLE_MAX_LIFETIME: "30000" + DB_NEXI_ORACLE_WRITE_CACHE_ENABLED: "true" # write cache DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://nodo-db.d.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" DB_PAGOPA_POSTGRES_USER: "cfg" - DB_PAGOPA_POSTGRES_ENABLED: "true" + DB_PAGOPA_POSTGRES_ENABLED: "true" # connect to datasource DB_PAGOPA_POSTGRES_SERVICE_IDENTIFIER: "NDP001DEV" DB_PAGOPA_POSTGRES_CONNECTION_TIMEOUT: "15000" DB_PAGOPA_POSTGRES_MAX_LIFETIME: "30000" + DB_PAGOPA_POSTGRES_WRITE_CACHE_ENABLED: "true" # write cache API_CONFIG_CACHE_URL: "https://api.dev.platform.pagopa.it/api-config-cache/p/v1/stakeholders/node/cache/schemas/v1" STAND_IN_MANAGER_URL: "https://api.dev.platform.pagopa.it/stand-in-manager/api/v1" OTEL_SERVICE_NAME: "pagopanodecfgsync" diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 3274950..9eaf6bf 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -71,22 +71,25 @@ microservice-chart: CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}' DB_NEXI_POSTGRES_URL: "jdbc:postgresql://db-postgres-ndp.p.db-nodo-pagamenti.com:5444/ndpspcp?prepareThreshold=0¤tSchema=NODO4_CFG" DB_NEXI_POSTGRES_USER: "pp_nodo4_cfg" - DB_NEXI_POSTGRES_ENABLED: "false" + DB_NEXI_POSTGRES_ENABLED: "false" # connect to datasource DB_NEXI_POSTGRES_SERVICE_IDENTIFIER: "NDP004PROD" DB_NEXI_POSTGRES_CONNECTION_TIMEOUT: "15000" DB_NEXI_POSTGRES_MAX_LIFETIME: "30000" + DB_NEXI_POSTGRES_WRITE_CACHE_ENABLED: "false" # write cache DB_NEXI_ORACLE_URL: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=db-nodo-pagamenti.p.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCP_NODO4_CFG))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" DB_NEXI_ORACLE_USER: "NODO4_CFG" - DB_NEXI_ORACLE_ENABLED: "true" + DB_NEXI_ORACLE_ENABLED: "true" # connect to datasource DB_NEXI_ORACLE_SERVICE_IDENTIFIER: "NDP003PROD" DB_NEXI_ORACLE_CONNECTION_TIMEOUT: "15000" DB_NEXI_ORACLE_MAX_LIFETIME: "30000" + DB_NEXI_ORACLE_WRITE_CACHE_ENABLED: "true" # write cache DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://nodo-db.p.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" DB_PAGOPA_POSTGRES_USER: "cfg" - DB_PAGOPA_POSTGRES_ENABLED: "true" + DB_PAGOPA_POSTGRES_ENABLED: "true" # connect to datasource DB_PAGOPA_POSTGRES_SERVICE_IDENTIFIER: "NDP001PROD" DB_PAGOPA_POSTGRES_CONNECTION_TIMEOUT: "15000" DB_PAGOPA_POSTGRES_MAX_LIFETIME: "30000" + DB_PAGOPA_POSTGRES_WRITE_CACHE_ENABLED: "true" # write cache API_CONFIG_CACHE_URL: "https://api.platform.pagopa.it/api-config-cache/p/v1/stakeholders/node/cache/schemas/v1" STAND_IN_MANAGER_URL: "https://api.platform.pagopa.it/stand-in-manager/api/v1" OTEL_SERVICE_NAME: "pagopanodecfgsync" diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 9071c30..1a000e2 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -70,22 +70,25 @@ microservice-chart: CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}' DB_NEXI_POSTGRES_URL: "jdbc:postgresql://db-postgres-ndp.u.db-nodo-pagamenti.com:5444/ndpspca?prepareThreshold=0¤tSchema=NODO4_CFG" DB_NEXI_POSTGRES_USER: "pp_nodo4_cfg" - DB_NEXI_POSTGRES_ENABLED: "false" + DB_NEXI_POSTGRES_ENABLED: "false" # connect to datasource DB_NEXI_POSTGRES_SERVICE_IDENTIFIER: "NDP004UAT" DB_NEXI_POSTGRES_CONNECTION_TIMEOUT: "15000" DB_NEXI_POSTGRES_MAX_LIFETIME: "30000" + DB_NEXI_POSTGRES_WRITE_CACHE_ENABLED: "false" # write cache DB_NEXI_ORACLE_URL: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1524)(HOST=db-nodo-pagamenti.u.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCA_NODO4_CFG))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" DB_NEXI_ORACLE_USER: "NODO4_CFG" - DB_NEXI_ORACLE_ENABLED: "true" + DB_NEXI_ORACLE_ENABLED: "true" # connect to datasource DB_NEXI_ORACLE_SERVICE_IDENTIFIER: "NDP003UAT" DB_NEXI_ORACLE_CONNECTION_TIMEOUT: "15000" DB_NEXI_ORACLE_MAX_LIFETIME: "30000" + DB_NEXI_ORACLE_WRITE_CACHE_ENABLED: "true" # write cache DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://nodo-db.u.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" DB_PAGOPA_POSTGRES_USER: "cfg" - DB_PAGOPA_POSTGRES_ENABLED: "true" + DB_PAGOPA_POSTGRES_ENABLED: "true" # connect to datasource DB_PAGOPA_POSTGRES_SERVICE_IDENTIFIER: "NDP001UAT" DB_PAGOPA_POSTGRES_CONNECTION_TIMEOUT: "15000" DB_PAGOPA_POSTGRES_MAX_LIFETIME: "30000" + DB_PAGOPA_POSTGRES_WRITE_CACHE_ENABLED: "true" # write cache API_CONFIG_CACHE_URL: "https://api.uat.platform.pagopa.it/api-config-cache/p/v1/stakeholders/node/cache/schemas/v1" STAND_IN_MANAGER_URL: "https://api.uat.platform.pagopa.it/stand-in-manager/api/v1" OTEL_SERVICE_NAME: "pagopanodecfgsync" diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 5708f4b..209682c 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -113,9 +113,9 @@ api-config-cache: enabled: 'true' write: ##permettono di abilitare/disabilitare la scrittura di cache sui vari database - pagopa-postgres: 'true' - nexi-postgres: 'false' - nexi-oracle: 'true' + pagopa-postgres: ${DB_PAGOPA_POSTGRES_WRITE_CACHE_ENABLED:'true'} + nexi-postgres: ${DB_NEXI_POSTGRES_WRITE_CACHE_ENABLED:'false'} + nexi-oracle: ${DB_NEXI_ORACLE_WRITE_CACHE_ENABLED:'true'} riversamento: enabled: ${RIVERSAMENTO_ENABLED} source: ${RIVERSAMENTO_SOURCE}