From 1ccd5846028ef7002940d58973ab05cf79206e3f Mon Sep 17 00:00:00 2001 From: Mohamed Khairallah Gharbi Date: Mon, 27 Jan 2025 15:03:30 +0100 Subject: [PATCH] add resources and optional memory variables --- storage/onpremise/activemq/main.tf | 8 ++++++++ storage/onpremise/activemq/variables.tf | 3 +++ 2 files changed, 11 insertions(+) diff --git a/storage/onpremise/activemq/main.tf b/storage/onpremise/activemq/main.tf index 299b17b88..42d7e0a9b 100644 --- a/storage/onpremise/activemq/main.tf +++ b/storage/onpremise/activemq/main.tf @@ -55,6 +55,14 @@ resource "kubernetes_deployment" "activemq" { name = "activemq" image = "${var.activemq.image}:${var.activemq.tag}" image_pull_policy = "IfNotPresent" + resources { + requests = var.activemq.requests + limits = var.activemq.limits + } + env { + name = "ACTIVEMQ_OPTS_MEMORY" + value = var.activemq.activemq_opts_memory + } volume_mount { name = "activemq-storage-secret-volume" mount_path = "/credentials/" diff --git a/storage/onpremise/activemq/variables.tf b/storage/onpremise/activemq/variables.tf index 05b5f82a4..74cb46562 100644 --- a/storage/onpremise/activemq/variables.tf +++ b/storage/onpremise/activemq/variables.tf @@ -12,6 +12,9 @@ variable "activemq" { tag = string node_selector = any image_pull_secrets = string + limits = optional(map(string)) + requests = optional(map(string)) + activemq_opts_memory = optional(string) }) }