From 4d15338ff88ad1c39f30897be8103f44df9ae257 Mon Sep 17 00:00:00 2001 From: Tope Emmanuel Date: Thu, 20 Jul 2023 11:49:10 +0100 Subject: [PATCH] Deploy redis WHY: Redis is a requisite componemt of the database deployment and it is hereby added to the IAC code in contimuation of the migration to AKS HOW: The existing code is modified and customised for redis, allowing the new code to work side by side with the existing paas code --- terraform/aks/config/development.tfvars.json | 3 +- terraform/aks/database.tf | 36 ++++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/terraform/aks/config/development.tfvars.json b/terraform/aks/config/development.tfvars.json index 0146e6c733..ba77c37b92 100644 --- a/terraform/aks/config/development.tfvars.json +++ b/terraform/aks/config/development.tfvars.json @@ -2,5 +2,6 @@ "cluster": "test", "namespace": "git-development", "environment": "development", - "azure_enable_backup_storage": false + "azure_enable_backup_storage": false, + "enable_monitoring": false } diff --git a/terraform/aks/database.tf b/terraform/aks/database.tf index 5bc436ab0a..5e69956a85 100644 --- a/terraform/aks/database.tf +++ b/terraform/aks/database.tf @@ -1,17 +1,31 @@ module "postgres" { source = "./vendor/modules/aks//aks/postgres" - namespace = var.namespace - environment = var.environment - azure_resource_prefix = var.azure_resource_prefix - service_name = var.service_name - service_short = var.service_short - config_short = var.config_short + namespace = var.namespace + environment = var.environment + azure_resource_prefix = var.azure_resource_prefix + service_name = var.service_name + service_short = var.service_short + config_short = var.config_short + cluster_configuration_map = module.cluster_data.configuration_map + use_azure = var.deploy_azure_backing_services + azure_enable_monitoring = var.enable_monitoring + server_version = "14" + azure_enable_backup_storage = var.azure_enable_backup_storage +} - cluster_configuration_map = module.cluster_data.configuration_map +module "redis-cache" { + source = "./vendor/modules/aks//aks/redis" - use_azure = var.deploy_azure_backing_services - azure_enable_monitoring = false - server_version = "14" - azure_enable_backup_storage = var.azure_enable_backup_storage + namespace = var.namespace + environment = var.environment + azure_resource_prefix = var.azure_resource_prefix + service_short = var.service_short + config_short = var.config_short + service_name = var.service_name + cluster_configuration_map = module.cluster_data.configuration_map + use_azure = var.deploy_azure_backing_services + azure_enable_monitoring = var.enable_monitoring + azure_patch_schedule = [{ "day_of_week": "Sunday", "start_hour_utc": 01 }] + azure_maxmemory_policy = "allkeys-lfu" }