diff --git a/daemonset.tf b/daemonset.tf index 7dc7385..4fc9dd3 100644 --- a/daemonset.tf +++ b/daemonset.tf @@ -56,6 +56,18 @@ resource "kubernetes_daemonset" "this" { "-statsd.mapping-config=/statsd-exporter/mapping-config.yaml", ] + resources { + requests { + memory = var.resources_statsd_requests_memory + cpu = var.resources_statsd_requests_cpu + } + + limits { + memory = var.resources_statsd_limits_memory + cpu = var.resources_statsd_limits_cpu + } + } + port { container_port = 9102 name = "metrics" diff --git a/variables.tf b/variables.tf index f044d7a..94a2fa6 100644 --- a/variables.tf +++ b/variables.tf @@ -76,6 +76,26 @@ variable "resources_limits_memory" { default = "1Gi" } +variable "resources_statsd_requests_cpu" { + description = "CPU requests for statsd sidecar container" + default = "50m" +} + +variable "resources_statsd_requests_memory" { + description = "memory requests for statsd sidecar container" + default = "100Mi" +} + +variable "resources_statsd_limits_cpu" { + description = "CPU limit for statsd sidecar container" + default = "50m" +} + +variable "resources_statsd_limits_memory" { + description = "memory limit for statsd sidecar container" + default = "100Mi" +} + variable "rbac_create" { default = true description = "If true, create and use RBAC resources"