Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schedule env vars #26

Merged
merged 65 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5bb065b
fix: scheduled recovery env. vars
alessio-cialini Dec 7, 2023
b296210
fix: scheduled recovery env. vars
alessio-cialini Dec 7, 2023
a6d978a
fix: scheduled recovery env. vars
alessio-cialini Dec 7, 2023
793e928
fix: fixed typo on ReceiptCosmosClientImpl
alessio-cialini Dec 7, 2023
8083af2
Bump to version 0.6.2-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
bca9752
fix: fixed typo on ReceiptCosmosClientImpl
alessio-cialini Dec 7, 2023
719fb16
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
872ecf4
fix: fixed typo on ReceiptCosmosClientImpl
alessio-cialini Dec 7, 2023
960d447
fix: Updated values-dev.yaml
alessio-cialini Dec 7, 2023
ff971aa
Bump to version 0.6.3-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
2364d4e
fix: Updated values-dev.yaml
alessio-cialini Dec 7, 2023
d2c8cf2
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
8d16d9a
fix: Updated RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
583648d
Bump to version 0.6.4-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
ba20c37
fix: Updated missing helm values
alessio-cialini Dec 7, 2023
ea7184d
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
e160297
Bump to version 0.6.5-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
a0c731d
fix: Updated RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
f9c6222
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
f1550ed
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
9325228
Bump to version 0.6.6-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
cb30dc6
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
bf617cd
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
f50f861
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
522b8e5
Bump to version 0.6.7-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
7b5fb8f
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
d63495f
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
3c4664f
Bump to version 0.6.8-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
421a6fc
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
7a90f41
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
6b6356b
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
32f2d19
Bump to version 0.6.9-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
6409989
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
99914a0
Bump to version 0.6.10-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
50a6a00
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
4f1a2b9
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
bcc99e8
Merge branch 'main' into fix-schedule-env-vars
alessio-cialini Dec 7, 2023
7157765
Bump to version 0.6.11-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
6c71a70
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
95ff5a8
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
f03b6cd
Bump to version 0.6.12-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
32b5625
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
bf14b9d
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
a2a428c
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
b084042
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
1413c8d
temp change to RegenerateReceiptPdf
alessio-cialini Dec 7, 2023
fb82665
Bump to version 0.6.13-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
b9e40bc
temp change to GenerateReceiptPdfServiceImpl
alessio-cialini Dec 7, 2023
127e2b2
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
1c0c2c0
Bump to version 0.6.14-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
6cdb4ca
temp change to GenerateReceiptPdfServiceImpl
alessio-cialini Dec 7, 2023
3010863
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
4f21ffd
Bump to version 0.6.15-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
1c7fe55
temp change to GenerateReceiptPdfServiceImpl
alessio-cialini Dec 7, 2023
b0128aa
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
96db924
Bump to version 0.6.16-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
94119a4
temp change to GenerateReceiptPdfServiceImpl
alessio-cialini Dec 7, 2023
100bc8f
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
74cec7e
temp change to GenerateReceiptPdfServiceImpl
alessio-cialini Dec 7, 2023
baacd12
Bump to version 0.6.17-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
4d3b143
Reinstating proper versions
alessio-cialini Dec 7, 2023
11c40c8
Merge remote-tracking branch 'origin/fix-schedule-env-vars' into fix-…
alessio-cialini Dec 7, 2023
c19b035
Bump to version 0.6.18-fix-schedule-env-vars [skip ci]
pagopa-github-bot Dec 7, 2023
13a35e3
feat: updated receipt generation services
alexyey Dec 11, 2023
2d0be88
Merge branch 'main' into fix-schedule-env-vars
alessio-cialini Dec 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 32 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,38 @@ 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 |
| `MAX_DATE_DIFF_MILLIS` | Difference in millis between the current time and the date from witch the<br/> receipts will be fetched in massive recover operation | 360000 |
| `RECOVER_FAILED_CRON` | CRON expression for timer trigger function that recover failed receipt | |
| 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 |
| `MAX_DATE_DIFF_MILLIS` | Difference in millis between the current time and the date from witch the<br/> 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<br/> receipts to notify will be fetched in massive recover operation | 360000 |
| `RECOVER_FAILED_CRON` | CRON expression for timer trigger function that recover failed receipt | |
| `TRIGGER_GEN_SCHEDULE` | CRON expression for timer trigger function that recover nor notified generater receipt | |

> 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)
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pagopareceiptpdfhelpdesk
description: Microservice description
type: application
version: 0.105.0
appVersion: 0.6.4
version: 0.119.0
appVersion: 0.6.18-fix-schedule-env-vars
dependencies:
- name: microservice-chart
version: 2.4.0
Expand Down
17 changes: 12 additions & 5 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-receipt-pdf-helpdesk
tag: "0.6.4"
tag: "0.6.18-fix-schedule-env-vars"
pullPolicy: Always
# https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs
livenessProbe:
Expand Down Expand Up @@ -57,8 +57,8 @@ microservice-chart:
memory: "768Mi"
cpu: "300m"
limits:
memory: "768Mi"
cpu: "400m"
memory: "1512Mi"
cpu: "700m"
autoscaling:
enable: true
minReplica: 1
Expand Down Expand Up @@ -109,23 +109,30 @@ microservice-chart:
OTEL_TRACES_SAMPLER: "always_on"
MAX_DATE_DIFF_MILLIS: "360000"
MAX_DATE_DIFF_NOTIFY_MILLIS: "360000"
TRIGGER_NOTIFY_REC_SCHEDULE: "0 0 */6 * * *"
RECOVER_FAILED_CRON: "0 0 /12 * * *"
TRIGGER_GEN_SCHEDULE: "0 0 */6 * * *"
RECOVER_FAILED_CRON: "0 0 */12 * * *"
AZURE_FUNCTIONS_MESH_JAVA_OPTS: "-javaagent:/home/site/wwwroot/jmx_prometheus_javaagent-0.19.0.jar=12345:/home/site/wwwroot/config.yaml -javaagent:/home/site/wwwroot/opentelemetry-javaagent.jar -Xmx768m -XX:+UseG1GC"
FAILED_AUTORECOVER_ENABLED: "true"
NOT_NOTIFIED_AUTORECOVER_ENABLED: "true"
envConfigMapExternals:
template-maps:
BRAND_LOGO_MAP: brand-logo-map
envFieldRef:
APP_NAME: "metadata.labels['app.kubernetes.io/instance']"
APP_VERSION: "metadata.labels['app.kubernetes.io/version']"
envSecret:
APPLICATIONINSIGHTS_CONNECTION_STRING: "ai-d-connection-string"
COSMOS_RECEIPTS_CONN_STRING: "cosmos-receipt-connection-string"
RECEIPTS_STORAGE_CONN_STRING: "receipts-storage-account-connection-string"
AzureWebJobsStorage: "receipts-storage-account-connection-string"
COSMOS_BIZ_EVENT_CONN_STRING: "cosmos-biz-event-d-connection-string"
COSMOS_RECEIPT_KEY: "cosmos-receipt-pkey"
COSMOS_BIZ_EVENT_KEY: "cosmos-bizevent-pkey"
OTEL_EXPORTER_OTLP_HEADERS: 'elastic-otl-secret-token'
PDV_TOKENIZER_SUBSCRIPTION_KEY: "tokenizer-api-key"
OCP_APIM_SUBSCRIPTION_KEY: "shared-apim-d-subscription-key"
AES_SECRET_KEY: "aes-secret-key"
AES_SALT: "aes-salt"
keyvault:
name: "pagopa-d-receipts-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
13 changes: 10 additions & 3 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-receipt-pdf-helpdesk
tag: "0.6.4"
tag: "0.6.18-fix-schedule-env-vars"
pullPolicy: Always
# https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs
livenessProbe:
Expand Down Expand Up @@ -109,23 +109,30 @@ microservice-chart:
OTEL_TRACES_SAMPLER: "always_on"
MAX_DATE_DIFF_MILLIS: "360000"
MAX_DATE_DIFF_NOTIFY_MILLIS: "360000"
TRIGGER_NOTIFY_REC_SCHEDULE: "0 0 */6 * * *"
RECOVER_FAILED_CRON: "0 0 /12 * * *"
TRIGGER_GEN_SCHEDULE: "0 0 */6 * * *"
RECOVER_FAILED_CRON: "0 0 */12 * * *"
AZURE_FUNCTIONS_MESH_JAVA_OPTS: "-javaagent:/home/site/wwwroot/jmx_prometheus_javaagent-0.19.0.jar=12345:/home/site/wwwroot/config.yaml -javaagent:/home/site/wwwroot/opentelemetry-javaagent.jar -Xmx768m -XX:+UseG1GC"
FAILED_AUTORECOVER_ENABLED: "false"
NOT_NOTIFIED_AUTORECOVER_ENABLED: "false"
envConfigMapExternals:
template-maps:
BRAND_LOGO_MAP: brand-logo-map
envFieldRef:
APP_NAME: "metadata.labels['app.kubernetes.io/instance']"
APP_VERSION: "metadata.labels['app.kubernetes.io/version']"
envSecret:
APPLICATIONINSIGHTS_CONNECTION_STRING: "ai-p-connection-string"
COSMOS_RECEIPTS_CONN_STRING: "cosmos-receipt-connection-string"
RECEIPTS_STORAGE_CONN_STRING: "receipts-storage-account-connection-string"
AzureWebJobsStorage: "receipts-storage-account-connection-string"
OCP_APIM_SUBSCRIPTION_KEY: "shared-apim-p-subscription-key"
COSMOS_BIZ_EVENT_CONN_STRING: "cosmos-biz-event-p-connection-string"
COSMOS_RECEIPT_KEY: "cosmos-receipt-pkey"
COSMOS_BIZ_EVENT_KEY: "cosmos-bizevent-pkey"
OTEL_EXPORTER_OTLP_HEADERS: "elastic-otl-secret-token"
PDV_TOKENIZER_SUBSCRIPTION_KEY: "tokenizer-api-key"
AES_SECRET_KEY: "aes-secret-key"
AES_SALT: "aes-salt"
keyvault:
name: "pagopa-p-receipts-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
Loading
Loading