Skip to content

Commit

Permalink
Configure memory requests and limits as variables
Browse files Browse the repository at this point in the history
  • Loading branch information
poornima-krishnasamy committed Mar 5, 2024
1 parent 6da2b76 commit 8230497
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions templates/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ controller:

resources:
limits:
memory: 12Gi
memory: ${memory_limits}
requests:
memory: 512Mi
memory: ${memory_requests}

config:
worker-shutdown-timeout: "440s"
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8230497

Please sign in to comment.