From 700701d3c2325683d971c56900ed509e3e795444 Mon Sep 17 00:00:00 2001 From: giomella Date: Wed, 3 Jan 2024 14:42:04 +0100 Subject: [PATCH] [PRDP-307] added env in helm chart and updated README.md --- README.md | 68 ++++++++++++++++++++++++------------------- helm/values-dev.yaml | 1 + helm/values-prod.yaml | 1 + helm/values-uat.yaml | 1 + 4 files changed, 41 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 74cf948..35bf789 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,19 @@ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pagopa_pagopa-receipt-pdf-helpdesk&metric=alert_status)](https://sonarcloud.io/dashboard?id=pagopa_pagopa-receipt-pdf-helpdesk) Java Azure Functions that exposed the following recover APIs: +- GetCart - GetReceipt - GetReceiptByOrganizationFiscalCodeAndIUV +- GetReceiptError +- GetReceiptMessage +- GetReceiptPdf - ReceiptToReviewed - RecoverFailedReceipt - RecoverFailedReceiptMassive +- RecoverFailedReceiptScheduled - RecoverNotNotifiedReceipt - RecoverNotNotifiedReceiptMassive +- RecoverNotNotifiedReceiptScheduled - RegenerateReceiptPdf --- @@ -79,42 +85,44 @@ On terminal type: then replace env variables with correct values (if there is NO default value, the variable HAS to be defined) -| VARIABLE | USAGE | DEFAULT VALUE | -|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------:| -| `RECEIPTS_STORAGE_CONN_STRING` | Connection string to the Receipt Queue | | -| `RECEIPT_QUEUE_TOPIC` | Topic name of the Receipt Queue | | -| `COSMOS_BIZ_EVENT_CONN_STRING` | Connection string to the BizEvent CosmosDB | | -| `COSMOS_BIZ_EVENT_SERVICE_ENDPOINT` | Endpoint to the BizEvent CosmosDB | | -| `COSMOS_BIZ_EVENT_DB_NAME` | Database name of the BizEvent database in CosmosDB | | -| `COSMOS_BIZ_EVENT_CONTAINER_NAME` | Container name of the BizEvent container in CosmosDB | | -| `COSMOS_RECEIPTS_CONN_STRING` | Connection string to the Receipt CosmosDB | | -| `COSMOS_RECEIPT_SERVICE_ENDPOINT` | Endpoint to the Receipt CosmosDB | | -| `COSMOS_RECEIPT_KEY` | Key to the Receipt CosmosDB | | -| `COSMOS_RECEIPT_DB_NAME` | Database name of the Receipt database in CosmosDB | | -| `COSMOS_RECEIPT_CONTAINER_NAME` | Container name of the Receipt container in CosmosDB | | -| `COSMOS_RECEIPT_ERROR_CONTAINER_NAME` | Container name of the Receipt-message-error container in CosmosDB | | -| `BLOB_STORAGE_ACCOUNT_ENDPOINT` | Endpoint to the Receipt Blob Storage | | -| `BLOB_STORAGE_CONTAINER_NAME` | Container name of the Blob Storage containing the pdf attachments | | -| `BLOB_STORAGE_DOWNLOAD_TIMEOUT` | Timeout for the call to retrieve the attachment from the blob storage | 10 | -| `BLOB_STORAGE_DOWNLOAD_MAX_RETRY` | Max number of retry for the call to retrieve the attachment from the blob storage | 5 | -| `PDV_TOKENIZER_BASE_PATH` | PDV Tokenizer API base path | "https://api.uat.tokenizer.pdv.pagopa.it/tokenizer/v1" | -| `PDV_TOKENIZER_SEARCH_TOKEN_ENDPOINT` | PDV Tokenizer API search token endpoint | "/tokens/search" | -| `PDV_TOKENIZER_FIND_PII_ENDPOINT` | PDV Tokenizer API find pii endpoint | "/tokens/%s/pii" | -| `PDV_TOKENIZER_CREATE_TOKEN_ENDPOINT` | PDV Tokenizer API create token endpoint | "/tokens" | -| `PDV_TOKENIZER_SUBSCRIPTION_KEY` | API azure ocp apim subscription key | | -| `PDV_TOKENIZER_INITIAL_INTERVAL` | PDV Tokenizer initial interval for retry a request that fail with 429 status code | 200 | -| `PDV_TOKENIZER_MULTIPLIER` | PDV Tokenizer interval multiplier for subsequent request retry | 2.0 | -| `PDV_TOKENIZER_RANDOMIZATION_FACTOR` | PDV Tokenizer randomization factor for interval retry calculation | 0.6 | -| `PDV_TOKENIZER_MAX_RETRIES` | PDV Tokenizer max request retry | 3 | -| `TOKENIZER_APIM_HEADER_KEY` | Tokenizer APIM header key | x-api-key | +| VARIABLE | USAGE | DEFAULT VALUE | +|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------:| +| `RECEIPTS_STORAGE_CONN_STRING` | Connection string to the Receipt Queue | | +| `RECEIPT_QUEUE_TOPIC` | Topic name of the Receipt Queue | | +| `COSMOS_BIZ_EVENT_CONN_STRING` | Connection string to the BizEvent CosmosDB | | +| `COSMOS_BIZ_EVENT_SERVICE_ENDPOINT` | Endpoint to the BizEvent CosmosDB | | +| `COSMOS_BIZ_EVENT_DB_NAME` | Database name of the BizEvent database in CosmosDB | | +| `COSMOS_BIZ_EVENT_CONTAINER_NAME` | Container name of the BizEvent container in CosmosDB | | +| `COSMOS_RECEIPTS_CONN_STRING` | Connection string to the Receipt CosmosDB | | +| `COSMOS_RECEIPT_SERVICE_ENDPOINT` | Endpoint to the Receipt CosmosDB | | +| `COSMOS_RECEIPT_KEY` | Key to the Receipt CosmosDB | | +| `COSMOS_RECEIPT_DB_NAME` | Database name of the Receipt database in CosmosDB | | +| `COSMOS_RECEIPT_CONTAINER_NAME` | Container name of the Receipt container in CosmosDB | | +| `COSMOS_RECEIPT_ERROR_CONTAINER_NAME` | Container name of the receipt-message-error container in CosmosDB | | +| `COSMOS_RECEIPT_MESSAGE_CONTAINER_NAME` | Container name of the receipts-io-messages container in CosmosDB | | +| `COSMOS_RECEIPT_CART_CONTAINER_NAME` | Container name of the cart-for-receipts container in CosmosDB | | +| `BLOB_STORAGE_ACCOUNT_ENDPOINT` | Endpoint to the Receipt Blob Storage | | +| `BLOB_STORAGE_CONTAINER_NAME` | Container name of the Blob Storage containing the pdf attachments | | +| `BLOB_STORAGE_DOWNLOAD_TIMEOUT` | Timeout for the call to retrieve the attachment from the blob storage | 10 | +| `BLOB_STORAGE_DOWNLOAD_MAX_RETRY` | Max number of retry for the call to retrieve the attachment from the blob storage | 5 | +| `PDV_TOKENIZER_BASE_PATH` | PDV Tokenizer API base path | "https://api.uat.tokenizer.pdv.pagopa.it/tokenizer/v1" | +| `PDV_TOKENIZER_SEARCH_TOKEN_ENDPOINT` | PDV Tokenizer API search token endpoint | "/tokens/search" | +| `PDV_TOKENIZER_FIND_PII_ENDPOINT` | PDV Tokenizer API find pii endpoint | "/tokens/%s/pii" | +| `PDV_TOKENIZER_CREATE_TOKEN_ENDPOINT` | PDV Tokenizer API create token endpoint | "/tokens" | +| `PDV_TOKENIZER_SUBSCRIPTION_KEY` | API azure ocp apim subscription key | | +| `PDV_TOKENIZER_INITIAL_INTERVAL` | PDV Tokenizer initial interval for retry a request that fail with 429 status code | 200 | +| `PDV_TOKENIZER_MULTIPLIER` | PDV Tokenizer interval multiplier for subsequent request retry | 2.0 | +| `PDV_TOKENIZER_RANDOMIZATION_FACTOR` | PDV Tokenizer randomization factor for interval retry calculation | 0.6 | +| `PDV_TOKENIZER_MAX_RETRIES` | PDV Tokenizer max request retry | 3 | +| `TOKENIZER_APIM_HEADER_KEY` | Tokenizer APIM header key | x-api-key | | `MAX_DATE_DIFF_MILLIS` | Difference in millis between the current time and the date from witch the
receipts will be fetched in massive recover operation | 360000 | | `MAX_DATE_DIFF_NOTIFY_MILLIS` | Difference in millis between the current time and the date from witch the
receipts will be fetched in massive recover operation on notification | 360000 | | `RECOVER_FAILED_CRON` | CRON expression for timer trigger function that recover failed receipt | | | `TRIGGER_NOTIFY_REC_SCHEDULE` | CRON expression for timer trigger function that recover not notifier receipt | | | `RECOVER_FAILED_MASSIVE_MAX_DAYS` | Number of days in addition to the current one to executed failed recovery | 0 | | `RECOVER_NOT_NOTIFIED_MASSIVE_MAX_DAYS` | Number of days in addition to the current one to executed not notified recovery | 0 | -| `AES_SECRET_KEY` | AES encryption secret key | | -| `AES_SALT` | AES encryption salt | +| `AES_SECRET_KEY` | AES encryption secret key | | +| `AES_SALT` | AES encryption salt | > to doc details about AZ fn config > see [here](https://stackoverflow.com/questions/62669672/azure-functions-what-is-the-purpose-of-having-host-json-and-local-settings-jso) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index f419a32..0365912 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -90,6 +90,7 @@ microservice-chart: COSMOS_RECEIPT_CONTAINER_NAME: "receipts" COSMOS_RECEIPT_ERROR_CONTAINER_NAME: "receipts-message-errors" COSMOS_RECEIPT_MESSAGE_CONTAINER_NAME: "receipts-io-messages" + COSMOS_RECEIPT_CART_CONTAINER_NAME: "cart-for-receipts" COSMOS_BIZ_EVENT_CONTAINER_NAME: "biz-events" PDF_ENGINE_ENDPOINT: "https://api.dev.platform.pagopa.it/shared/pdf-engine/v1/generate-pdf" BLOB_STORAGE_ACCOUNT_ENDPOINT: "https://pagopadweureceiptsfnsa.blob.core.windows.net/" diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 2facee5..21b5d37 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -90,6 +90,7 @@ microservice-chart: COSMOS_RECEIPT_CONTAINER_NAME: "receipts" COSMOS_RECEIPT_ERROR_CONTAINER_NAME: "receipts-message-errors" COSMOS_RECEIPT_MESSAGE_CONTAINER_NAME: "receipts-io-messages" + COSMOS_RECEIPT_CART_CONTAINER_NAME: "cart-for-receipts" COSMOS_BIZ_EVENT_CONTAINER_NAME: "biz-events" PDF_ENGINE_ENDPOINT: "https://api.platform.pagopa.it/shared/pdf-engine/v1/generate-pdf" BLOB_STORAGE_ACCOUNT_ENDPOINT: "https://pagopapweureceiptsfnsa.blob.core.windows.net" diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index b21f2c3..974fffc 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -90,6 +90,7 @@ microservice-chart: COSMOS_RECEIPT_CONTAINER_NAME: "receipts" COSMOS_RECEIPT_ERROR_CONTAINER_NAME: "receipts-message-errors" COSMOS_RECEIPT_MESSAGE_CONTAINER_NAME: "receipts-io-messages" + COSMOS_RECEIPT_CART_CONTAINER_NAME: "cart-for-receipts" COSMOS_BIZ_EVENT_CONTAINER_NAME: "biz-events" PDF_ENGINE_ENDPOINT: "https://api.uat.platform.pagopa.it/shared/pdf-engine/v1/generate-pdf" BLOB_STORAGE_ACCOUNT_ENDPOINT: "https://pagopauweureceiptsfnsa.blob.core.windows.net"