From 8847209ecb0f323a21255393bea970091adf103b Mon Sep 17 00:00:00 2001 From: Pasquale Spica <36746022+pasqualespica@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:15:51 +0200 Subject: [PATCH] feat: Prdp 41 ci update helm chart (#7) * [PRDP-41] ci: Updating helm chart values * [PRDP-41] ci: Updating helm chart values with canary and affinity configs * [PRDP-41] ci: updated helm charts in order to introduce secret and config valus * [PRDP-41] ci: updated helm charts in order to introduce secret and config values * minor fix --------- Co-authored-by: Alessio Cialini --- helm/values-dev.yaml | 58 ++++++++++++++++++++++++++++++++++++------- helm/values-prod.yaml | 58 ++++++++++++++++++++++++++++++++++++------- helm/values-uat.yaml | 58 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 147 insertions(+), 27 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index a39b2576..32b13935 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -1,9 +1,9 @@ microservice-chart: - namespace: "" # TODO + namespace: "receipts" nameOverride: "" fullnameOverride: "" image: - repository: pagopadcommonacr.azurecr.io/pagopa # TODO + repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore tag: "0.0.1" pullPolicy: Always # https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs @@ -29,8 +29,8 @@ microservice-chart: port: 80 ingress: create: true - host: "weudev..internal.dev.platform.pagopa.it" # TODO - path: /pagopa--service/(.*) # TODO + host: "weudev.receipts.internal.dev.platform.pagopa.it" + path: /pagopa-receipt-pdf-datastore/(.*) serviceAccount: create: false annotations: {} @@ -61,13 +61,53 @@ microservice-chart: type: Utilization # Allowed types are 'Utilization' or 'AverageValue' value: "75" envConfig: - WEBSITE_SITE_NAME: "pagopa" # required to show cloud role name in application insights # TODO + WEBSITE_SITE_NAME: "pagopareceiptpdfdatastore" # required to show cloud role name in application insights FUNCTIONS_WORKER_RUNTIME: "java" + RECEIPT_QUEUE_TOPIC: 'pagopa-d-weu-receipts-queue-receipt-waiting-4-gen' + COSMOS_RECEIPT_QUEUE_MAX_RETRY: '5' + PDF_ENGINE_ENDPOINT: 'https://api.dev.platform.pagopa.it/shared/pdf-engine/v1/generate-pdf' + COSMOS_RECEIPT_SERVICE_ENDPOINT: 'https://pagopa-d-weu-receipts-ds-cosmos-account.documents.azure.com:443/' + COSMOS_RECEIPT_DB_NAME: 'db' + COSMOS_RECEIPT_CONTAINER_NAME: 'receipts' + PDF_BLOB_STORAGE_ENDPOINT: 'https://pagopadweureceiptsfnsa.blob.core.windows.net' + PDF_BLOB_STORAGE_CONTAINER: 'pagopa-d-weu-receipts-azure-blob-receipt-st-attach' envSecret: - APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string' # TODO set in kv + APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string' + PDF_BLOB_STORAGE_CONN_STRING: 'pdf-blob-storage-d-connection-string' + COSMOS_RECEIPTS_CONN_STRING: 'cosmos-receipt-d-connection-string' + RECEIPT_QUEUE_CONN_STRING: 'receipt-queue-d-connection-string' + COSMOS_BIZ_EVENT_CONN_STRING: 'cosmos-biz-event-d-connection-string' + OCP_APIM_SUBSCRIPTION_KEY: 'shared-apim-d-subscription-key' + COSMOS_RECEIPT_KEY: 'cosmos-receipt-d-key' keyvault: - name: "pagopa-d--kv" # TODO + name: "pagopa-d-receipts-kv" tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" nodeSelector: {} - tolerations: [] - affinity: {} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node_type + operator: In + values: + - user + canaryDelivery: + create: true + ingress: + create: true + canary: + type: header + headerName: X-Canary + headerValue: canary + weightPercent: 0 + service: + create: true + deployment: + create: true + image: + repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore + tag: "0.0.1" + pullPolicy: Always + envConfig: + envSecret: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 83842f0c..32cc2ee0 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -1,9 +1,9 @@ microservice-chart: - namespace: "" # TODO + namespace: "receipts" nameOverride: "" fullnameOverride: "" image: - repository: pagopapcommonacr.azurecr.io/pagopa # TODO + repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore tag: "0.0.1" pullPolicy: Always # https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs @@ -29,8 +29,8 @@ microservice-chart: port: 80 ingress: create: true - host: "weuprod..internal.platform.pagopa.it" # TODO - path: /pagopa--service/(.*) # TODO + host: "weuprod.receipts.internal.platform.pagopa.it" + path: /pagopa-receipt-pdf-datastore/(.*) # serviceAccount: create: false annotations: {} @@ -61,13 +61,53 @@ microservice-chart: type: Utilization # Allowed types are 'Utilization' or 'AverageValue' value: "75" envConfig: - WEBSITE_SITE_NAME: "pagopa" # required to show cloud role name in application insights # TODO + WEBSITE_SITE_NAME: "pagopareceiptpdfdatastore" # required to show cloud role name in application insights FUNCTIONS_WORKER_RUNTIME: "java" + RECEIPT_QUEUE_TOPIC: 'pagopa-p-weu-receipts-queue-receipt-waiting-4-gen' + COSMOS_RECEIPT_QUEUE_MAX_RETRY: '5' + PDF_ENGINE_ENDPOINT: 'https://api.prod.platform.pagopa.it/shared/pdf-engine/v1/generate-pdf' + COSMOS_RECEIPT_SERVICE_ENDPOINT: 'https://pagopa-p-weu-receipts-ds-cosmos-account.documents.azure.com:443/' + COSMOS_RECEIPT_DB_NAME: 'db' + COSMOS_RECEIPT_CONTAINER_NAME: 'receipts' + PDF_BLOB_STORAGE_ENDPOINT: 'https://pagopapweureceiptsfnsa.blob.core.windows.net' + PDF_BLOB_STORAGE_CONTAINER: 'pagopa-p-weu-receipts-azure-blob-receipt-st-attach' envSecret: - APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string' # TODO set in kv + APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-p-connection-string' + PDF_BLOB_STORAGE_CONN_STRING: 'pdf-blob-storage-p-connection-string' + COSMOS_RECEIPTS_CONN_STRING: 'cosmos-receipt-p-connection-string' + RECEIPT_QUEUE_CONN_STRING: 'receipt-queue-p-connection-string' + COSMOS_BIZ_EVENT_CONN_STRING: 'cosmos-biz-event-p-connection-string' + OCP_APIM_SUBSCRIPTION_KEY: 'shared-apim-p-subscription-key' + COSMOS_RECEIPT_KEY: 'cosmos-receipt-p-key' keyvault: - name: "pagopa-p--kv" # TODO + name: "pagopa-p-receipts-kv" tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" nodeSelector: {} - tolerations: [] - affinity: {} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node_type + operator: In + values: + - user + canaryDelivery: + create: true + ingress: + create: true + canary: + type: header + headerName: X-Canary + headerValue: canary + weightPercent: 0 + service: + create: true + deployment: + create: true + image: + repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore + tag: "0.0.1" + pullPolicy: Always + envConfig: + envSecret: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index 1a380e50..92a5c9a5 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -1,9 +1,9 @@ microservice-chart: - namespace: "" # TODO + namespace: "receipts" nameOverride: "" fullnameOverride: "" image: - repository: pagopaucommonacr.azurecr.io/pagopa # TODO + repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore tag: "0.0.1" pullPolicy: Always # https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs @@ -29,8 +29,8 @@ microservice-chart: port: 80 ingress: create: true - host: "weuuat..internal.uat.platform.pagopa.it" # TODO - path: /pagopa--service/(.*) # TODO + host: "weuuat.receipts.internal.uat.platform.pagopa.it" + path: /pagopa-receipt-pdf-datastore/(.*) serviceAccount: create: false annotations: {} @@ -61,13 +61,53 @@ microservice-chart: type: Utilization # Allowed types are 'Utilization' or 'AverageValue' value: "75" envConfig: - WEBSITE_SITE_NAME: "pagopa" # required to show cloud role name in application insights # TODO + WEBSITE_SITE_NAME: "pagopareceiptpdfdatastore" # required to show cloud role name in application insights FUNCTIONS_WORKER_RUNTIME: "java" + RECEIPT_QUEUE_TOPIC: 'pagopa-u-weu-receipts-queue-receipt-waiting-4-gen' + COSMOS_RECEIPT_QUEUE_MAX_RETRY: '5' + PDF_ENGINE_ENDPOINT: 'https://api.uat.platform.pagopa.it/shared/pdf-engine/v1/generate-pdf' + COSMOS_RECEIPT_SERVICE_ENDPOINT: 'https://pagopa-u-weu-receipts-ds-cosmos-account.documents.azure.com:443/' + COSMOS_RECEIPT_DB_NAME: 'db' + COSMOS_RECEIPT_CONTAINER_NAME: 'receipts' + PDF_BLOB_STORAGE_ENDPOINT: 'https://pagopauweureceiptsfnsa.blob.core.windows.net' + PDF_BLOB_STORAGE_CONTAINER: 'pagopa-u-weu-receipts-azure-blob-receipt-st-attach' envSecret: - APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string' # TODO set in kv + APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-u-connection-string' + PDF_BLOB_STORAGE_CONN_STRING: 'pdf-blob-storage-u-connection-string' + COSMOS_RECEIPTS_CONN_STRING: 'cosmos-receipt-u-connection-string' + RECEIPT_QUEUE_CONN_STRING: 'receipt-queue-u-connection-string' + COSMOS_BIZ_EVENT_CONN_STRING: 'cosmos-biz-event-u-connection-string' + OCP_APIM_SUBSCRIPTION_KEY: 'shared-apim-u-subscription-key' + COSMOS_RECEIPT_KEY: 'cosmos-receipt-u-key' keyvault: - name: "pagopa-u--kv" # TODO + name: "pagopa-u-receipts-kv" tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" nodeSelector: {} - tolerations: [] - affinity: {} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node_type + operator: In + values: + - user + canaryDelivery: + create: true + ingress: + create: true + canary: + type: header + headerName: X-Canary + headerValue: canary + weightPercent: 0 + service: + create: true + deployment: + create: true + image: + repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore + tag: "0.0.1" + pullPolicy: Always + envConfig: + envSecret: