From a13e2aad42a75b4c668e660de8de35690c8d0dc1 Mon Sep 17 00:00:00 2001 From: Georgi Ivanov Date: Wed, 26 Jun 2024 14:04:10 +0100 Subject: [PATCH] testing --- k8s-readonly.tf | 11 +++++++++++ k8s-readwrite.tf | 11 +++++++++++ variables.tf | 12 ++++++++++++ 3 files changed, 34 insertions(+) diff --git a/k8s-readonly.tf b/k8s-readonly.tf index 7f3aee5..5cf102e 100644 --- a/k8s-readonly.tf +++ b/k8s-readonly.tf @@ -200,6 +200,17 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { } } + dynamic "env" { + for_each = { + for k, v in var.hms_ro_datanucleus_connection_pool_config : + k => v if v != null + } + content { + name = env.key + value = env.value + } + } + liveness_probe { tcp_socket { port = var.hive_metastore_port diff --git a/k8s-readwrite.tf b/k8s-readwrite.tf index 388f1eb..fb18051 100644 --- a/k8s-readwrite.tf +++ b/k8s-readwrite.tf @@ -241,6 +241,17 @@ resource "kubernetes_deployment_v1" "apiary_hms_readwrite" { } } + dynamic "env" { + for_each = { + for k, v in var.hms_rw_datanucleus_connection_pool_config : + k => v if v != null + } + content { + name = env.key + value = env.value + } + } + liveness_probe { tcp_socket { port = var.hive_metastore_port diff --git a/variables.tf b/variables.tf index 5e83cb1..e7504d9 100644 --- a/variables.tf +++ b/variables.tf @@ -768,4 +768,16 @@ variable "hms_rw_datanucleus_connection_pooling_type" { description = "The Datanucleus connection pool type: Valid types are BoneCP, HikariCP, c3p0, dbcp, dbcp2" type = string default = "HikariCP" +} + +variable "hms_ro_datanucleus_connection_pool_config" { + description = "A map of env vars supported by Apiary docker image that can configure the chosen Datanucleus connection pool" + type = map(any) + default = {} +} + +variable "hms_rw_datanucleus_connection_pool_config" { + description = "A map of env vars supported by Apiary docker image that can configure the chosen Datanucleus connection pool" + type = map(any) + default = {} } \ No newline at end of file