From 208cc682061a8acd7e57c3d321b7b389e032cdd0 Mon Sep 17 00:00:00 2001 From: paduin Date: Fri, 19 Jan 2024 14:12:49 +0100 Subject: [PATCH] testing --- k8s-readonly.tf | 10 ++++++---- templates.tf | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/k8s-readonly.tf b/k8s-readonly.tf index 8b10ded..37d28d6 100644 --- a/k8s-readonly.tf +++ b/k8s-readonly.tf @@ -45,16 +45,18 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { dynamic "security_context" { for_each = var.enable_sysctl_config_in_eks ? ["enabled"] : [] content { - sysctl = [{ + sysctl { name="net.ipv4.tcp_keepalive_time" value="${var.tcp_keepalive_time}" - },{ + } + sysctl { name="net.ipv4.tcp_keepalive_intvl" value="${var.tcp_keepalive_intvl}" - },{ + } + sysctl { name="net.ipv4.tcp_keepalive_probes" value="${var.tcp_keepalive_probes}" - }] + } } } dynamic "init_container" { diff --git a/templates.tf b/templates.tf index 985706e..1cf2644 100644 --- a/templates.tf +++ b/templates.tf @@ -61,6 +61,9 @@ locals{ mysql_permissions = "ALL" mysql_master_cred_arn = var.external_database_host == "" ? aws_secretsmanager_secret.apiary_mysql_master_credentials[0].arn : null mysql_user_cred_arn = data.aws_secretsmanager_secret.db_rw_user.arn + tcp_keepalive_time = var.tcp_keepalive_time + tcp_keepalive_intvl = var.tcp_keepalive_intvl + tcp_keepalive_probes = var.tcp_keepalive_probes }) hms_readonly_template = templatefile("${path.module}/templates/apiary-hms-readonly.json", { @@ -104,5 +107,8 @@ locals{ mysql_write_db = "${var.external_database_host == "" ? join("", aws_rds_cluster.apiary_cluster.*.endpoint) : var.external_database_host}" mysql_master_cred_arn = var.external_database_host == "" ? aws_secretsmanager_secret.apiary_mysql_master_credentials[0].arn : null mysql_user_cred_arn = data.aws_secretsmanager_secret.db_ro_user.arn + tcp_keepalive_time = var.tcp_keepalive_time + tcp_keepalive_intvl = var.tcp_keepalive_intvl + tcp_keepalive_probes = var.tcp_keepalive_probes }) }