Skip to content

Commit

Permalink
feat: added resource requests/limits placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Nix committed Nov 15, 2022
1 parent b7540ee commit 916868b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lacework_cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ resource "kubernetes_deployment" "lacework_k8s_collector" {
}
}

resources {
requests = {
cpu = var.lacework_cluster_cpu_request
memory = var.lacework_cluster_mem_request
}
limits = {
cpu = var.lacework_cluster_cpu_limit
memory = var.lacework_cluster_mem_limit
}
}

volume_mount {
name = "cfgmap"
mount_path = "/config"
Expand Down
24 changes: 24 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ variable "lacework_cluster_configuration" {
default = {}
}

variable "lacework_cluster_cpu_limit" {
type = string
default = "500m"
description = "The limit of CPU units for the Lacework K8s collector pod"
}

variable "lacework_cluster_cpu_request" {
type = string
default = "200m"
description = "The amount of CPU units to request for the Lacework K8s collector pod"
}

variable "lacework_cluster_exclusive" {
type = bool
description = "A boolean representing whether the Lacework K8s collector will operate in exclusive mode"
Expand Down Expand Up @@ -81,6 +93,18 @@ variable "lacework_cluster_image_pull_policy" {
default = "Always"
}

variable "lacework_cluster_mem_limit" {
type = string
default = "1450Mi"
description = "The limit of Memory for the Lacework K8s collector pod"
}

variable "lacework_cluster_mem_request" {
type = string
default = "512Mi"
description = "The amount of Memory to request for the Lacework K8s collector pod"
}

variable "lacework_config_name" {
type = string
description = "The name for the Lacework agent configuration within Kubernetes"
Expand Down

0 comments on commit 916868b

Please sign in to comment.