Skip to content

Commit dc10c67

Browse files
committed
Add customize node min, max and desired option.
1 parent 5161884 commit dc10c67

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

eks.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ module "eks" {
3434

3535
eks_managed_node_groups = {
3636
node-group-1 = {
37-
min_size = 3
38-
max_size = 5
39-
desired_size = 3
37+
min_size = var.eks_managed_node_groups_options.min_size
38+
max_size = var.eks_managed_node_groups_options.max_size
39+
desired_size = var.eks_managed_node_groups_options.desired_size
4040

4141
instance_types = var.node_group_instance_sizes
4242
capacity_type = "ON_DEMAND"

templates/external_dns_private_values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ zoneIdFilters: ["${aws_private_hosted_zone}"]
1919
annotationFilter: "alb.ingress.kubernetes.io/scheme=internal"
2020
txtOwnerId: ${eks_cluster_id}
2121

22+
%{ if anytrue([image_registry != null, image_repository != null, image_tag != null]) ~}
2223
image:
2324
%{ if image_registry != null ~}
2425
registry: ${image_registry}
@@ -29,3 +30,4 @@ image:
2930
%{ if image_tag != null ~}
3031
tag: ${image_tag}
3132
%{ endif ~}
33+
%{ endif ~}

templates/external_dns_values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ zoneIdFilters: ["${aws_public_hosted_zone}"]
1919
annotationFilter: "alb.ingress.kubernetes.io/scheme=internet-facing"
2020
txtOwnerId: ${eks_cluster_id}
2121

22+
%{ if anytrue([image_registry != null, image_repository != null, image_tag != null]) ~}
2223
image:
2324
%{ if image_registry != null ~}
2425
registry: ${image_registry}
@@ -29,3 +30,4 @@ image:
2930
%{ if image_tag != null ~}
3031
tag: ${image_tag}
3132
%{ endif ~}
33+
%{ endif ~}

variables.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,20 @@ variable "eks_aws_auth_configmap_users" {
9292
default = []
9393
}
9494

95+
variable "eks_managed_node_groups_options" {
96+
description = "An object variable containing key-value pairs for the eks_managed_node_groups parameters."
97+
type = object({
98+
min_size = number
99+
max_size = number
100+
desired_size = number
101+
})
102+
default = {
103+
min_size = 3
104+
max_size = 5
105+
desired_size = 3
106+
}
107+
}
108+
95109
variable "create_logs_bucket" {
96110
description = "Flag to create an S3 bucket or not."
97111
type = bool

0 commit comments

Comments
 (0)