diff --git a/modules/api/main.tf b/modules/api/main.tf index f07a24d..53fabd3 100644 --- a/modules/api/main.tf +++ b/modules/api/main.tf @@ -178,6 +178,7 @@ module "swr_queue_worker" { mailchimp_api = var.mailchimp_api serlo_org_database_layer_host = module.database_layer.host concurrency = var.swr_queue_worker.concurrency + serlo_org_database_url = var.database_layer.database_url } module "api_db_migration" { diff --git a/modules/api/swr-queue-worker/main.tf b/modules/api/swr-queue-worker/main.tf index e56d9bf..4435562 100644 --- a/modules/api/swr-queue-worker/main.tf +++ b/modules/api/swr-queue-worker/main.tf @@ -80,11 +80,14 @@ variable "serlo_org_database_layer_host" { type = string } +variable "serlo_org_database_url" { + type = string +} + variable "concurrency" { description = "Number of parallel requests" type = number } - resource "kubernetes_service" "server" { metadata { name = local.name @@ -237,6 +240,11 @@ resource "kubernetes_deployment" "server" { value = var.secrets.serlo_org } + env { + name = "MYSQL_URI" + value = var.serlo_org_database_url + } + env { name = "SWR_QUEUE_WORKER_CONCURRENCY" value = var.concurrency