diff --git a/main.tf b/main.tf index 6039752..7aae800 100644 --- a/main.tf +++ b/main.tf @@ -60,6 +60,8 @@ resource "helm_release" "nginx_ingress" { enable_owasp = var.enable_owasp default = var.controller_name == "default" ? true : false name_override = "ingress-${var.controller_name}" + memory_requests = var.memory_requests + memory_limits = var.memory_limits enable_external_dns_annotation = var.enable_external_dns_annotation backend_repo = var.backend_repo backend_tag = var.backend_tag diff --git a/templates/values.yaml.tpl b/templates/values.yaml.tpl index 006225c..6266e5a 100644 --- a/templates/values.yaml.tpl +++ b/templates/values.yaml.tpl @@ -154,9 +154,9 @@ controller: resources: limits: - memory: 12Gi + memory: ${memory_limits} requests: - memory: 512Mi + memory: ${memory_requests} config: worker-shutdown-timeout: "440s" diff --git a/variables.tf b/variables.tf index 24475a3..29fc9f8 100644 --- a/variables.tf +++ b/variables.tf @@ -68,6 +68,18 @@ variable "enable_external_dns_annotation" { default = false } +variable "memory_limits" { + description = "value for resources:limits memory value" + default = "2Gi" + type = string +} + +variable "memory_requests" { + description = "value for resources:requests memory value" + default = "512Mi" + type = string +} + variable "cluster" { description = " cluster name used for opensearch indicies" type = string