Skip to content

Commit

Permalink
Merge pull request #125 from Ensono/kubelet-gc-threshold
Browse files Browse the repository at this point in the history
Exposing kubelet garbage collection threshold via variables
  • Loading branch information
ravisinghkr committed Jun 7, 2024
2 parents 051d482 + c0523cb commit e55e769
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions aws/modules/infrastructure_modules/eks/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ locals {
"net.ipv4.conf.default.secure_redirects" = "0"
"net.ipv4.conf.all.log_martians" = "1"
"net.ipv4.conf.default.log_martians" = "1"
[settings.kubernetes]
image-gc-high-threshold-percent = "${var.image_gc_high_threshold_percent}"
image-gc-low-threshold-percent = "${var.image_gc_low_threshold_percent}"
%{endif}
EOT

Expand Down
15 changes: 14 additions & 1 deletion aws/modules/infrastructure_modules/eks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,21 @@ variable "cluster_security_group_additional_rules" {
}
}
}

variable "trusted_role_arn" {
description = "IAM role passed to KMS Policy"
type = string
default = ""
}
}

variable "image_gc_high_threshold_percent" {
description = "The percent of disk usage that initiates image garbage collection by kubelet. This value must be greater than the low threshold value"
type = number
default = 85
}

variable "image_gc_low_threshold_percent" {
description = "The kubelet deletes images until disk usage reaches this value. This value must be less than the high threshold value"
type = number
default = 80
}

0 comments on commit e55e769

Please sign in to comment.