Skip to content

Commit

Permalink
chore: Workload profiles migration DEV (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf authored Mar 29, 2024
1 parent 96963e9 commit 48c1fc1
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 161 deletions.
74 changes: 0 additions & 74 deletions .devops/code-review-pipelines.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .devops/pnpg-code-review-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ configEnvSpecific:
JAVA_TOOL_OPTIONS: "-javaagent:/applicationinsights-agent.jar"
APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL: "OFF"
EXTERNAL_API_LOG_LEVEL: "DEBUG"
MS_ONBOARDING_URL: "https://selc-d-onboarding-ms-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
MS_ONBOARDING_URL: "https://selc-d-onboarding-ms-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
20 changes: 17 additions & 3 deletions infra/container_apps/env/dev-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ tags = {
}

container_app = {
min_replicas = 1
min_replicas = 0
max_replicas = 1
scale_rules = []
scale_rules = [
{
custom = {
metadata = {
"desiredReplicas" = "1"
"start" = "0 8 * * MON-FRI"
"end" = "0 19 * * MON-FRI"
"timezone" = "Europe/Rome"
}
type = "cron"
}
name = "cron-scale-rule"
}
]
cpu = 0.5
memory = "1Gi"
}

workload_profile_name = null

app_settings = [

Expand Down Expand Up @@ -66,7 +80,7 @@ app_settings = [
},
{
name = "MS_PRODUCT_URL"
value = "https://dev01.pnpg.internal.dev.selfcare.pagopa.it/ms-product/v1"
value = "https://selc-d-pnpg-product-ca.whiteglacier-211c4885.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_USER_REGISTRY_URL"
Expand Down
29 changes: 21 additions & 8 deletions infra/container_apps/env/dev/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@ tags = {
}

container_app = {
min_replicas = 1
min_replicas = 0
max_replicas = 1
scale_rules = []
scale_rules = [
{
custom = {
metadata = {
"desiredReplicas" = "1"
"start" = "0 8 * * MON-FRI"
"end" = "0 19 * * MON-FRI"
"timezone" = "Europe/Rome"
}
type = "cron"
}
name = "cron-scale-rule"
}
]
cpu = 0.5
memory = "1Gi"
}
Expand Down Expand Up @@ -48,31 +61,31 @@ app_settings = [
},
{
name = "MS_ONBOARDING_URL"
value = "https://selc-d-onboarding-ms-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
value = "https://selc-d-onboarding-ms-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
},
{
name = "MS_CORE_URL"
value = "https://selc-d-ms-core-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
value = "https://selc-d-ms-core-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_PARTY_REGISTRY_PROXY_URL"
value = "https://selc-d-party-reg-proxy-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
value = "https://selc-d-party-reg-proxy-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_PARTY_PROCESS_URL"
value = "https://selc-d-ms-core-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
value = "https://selc-d-ms-core-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
},
{
name = "MS_PRODUCT_URL"
value = "https://selc.internal.dev.selfcare.pagopa.it/ms-product/v1"
value = "https://selc-d-product-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
},
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.uat.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-d-ms-core-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
value = "https://selc-d-ms-core-ca.livelydesert-633675bb.westeurope.azurecontainerapps.io"
},
{
name = "STORAGE_CONTAINER"
Expand Down
1 change: 1 addition & 0 deletions infra/container_apps/env/prod-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ container_app = {
memory = "2.5Gi"
}

workload_profile_name = null

app_settings = [

Expand Down
1 change: 1 addition & 0 deletions infra/container_apps/env/uat-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ container_app = {
memory = "1Gi"
}

workload_profile_name = null

app_settings = [

Expand Down
3 changes: 2 additions & 1 deletion infra/container_apps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ provider "azurerm" {
features {}
}

module "container_app_dashboard_backend" {
module "container_app_ext_api_backend" {
source = "github.com/pagopa/selfcare-commons//infra/terraform-modules/container_app_microservice?ref=main"

is_pnpg = var.is_pnpg
Expand All @@ -20,6 +20,7 @@ module "container_app_dashboard_backend" {
image_tag = var.image_tag
app_settings = var.app_settings
secrets_names = var.secrets_names
workload_profile_name = var.workload_profile_name

tags = var.tags
}
6 changes: 6 additions & 0 deletions infra/container_apps/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ variable "app_settings" {
variable "secrets_names" {
type = map(string)
description = "KeyVault secrets to get values from"
}

variable "workload_profile_name" {
type = string
description = "Workload Profile name to use"
default = "Consumption"
}

0 comments on commit 48c1fc1

Please sign in to comment.