From 8d73600a2e75bcc488b9f3e66b1a546f22ccef1a Mon Sep 17 00:00:00 2001 From: Dmitry Dunaev Date: Wed, 21 Dec 2022 12:57:05 +0100 Subject: [PATCH] [WIFI-12021] Add: new nodegroup ready for OWLS Signed-off-by: Dmitry Dunaev --- .../wifi-289708231103/cloudsdk_cicd/eks.tf | 40 +++++++++++++++++++ .../cloudsdk_cicd/variables.tf | 5 +++ 2 files changed, 45 insertions(+) diff --git a/terraform/wifi-289708231103/cloudsdk_cicd/eks.tf b/terraform/wifi-289708231103/cloudsdk_cicd/eks.tf index f3bbc22..97e17ee 100644 --- a/terraform/wifi-289708231103/cloudsdk_cicd/eks.tf +++ b/terraform/wifi-289708231103/cloudsdk_cicd/eks.tf @@ -145,6 +145,46 @@ module "eks" { }, ] } + ], [ + for subnet in module.vpc_main.private_subnets : + # OWLS testing nodes with taints + { + name = format("tests-owls-%s", data.aws_subnet.private_az[subnet].availability_zone) + asg_desired_capacity = var.node_group_settings["min_capacity"] + asg_max_size = var.node_group_settings["max_capacity"] + asg_min_size = var.node_group_settings["min_capacity"] + instance_type = var.testing_owls_instance_type + additional_userdata = local.worker_additional_userdata + kubelet_extra_args = "--node-labels=node.kubernetes.io/lifecycle=normal,project=ucentral,env=owls --register-with-taints tests=true:NoSchedule --allowed-unsafe-sysctls net.ipv4.tcp_keepalive_intvl,net.ipv4.tcp_keepalive_probes,net.ipv4.tcp_keepalive_time" + subnets = [subnet] + tags = [ + { + key : "k8s.io/cluster-autoscaler/enabled", + value : true, + propagate_at_launch : true, + }, + { + key : "k8s.io/cluster-autoscaler/${local.cluster_name}", + value : true + propagate_at_launch : true, + }, + { + key : "k8s.io/cluster-autoscaler/node-template/label/project", + value : "ucentral", + propagate_at_launch : true, + }, + { + key : "k8s.io/cluster-autoscaler/node-template/label/env", + value : "owls", + propagate_at_launch : true, + }, + { + key : "k8s.io/cluster-autoscaler/node-template/taint/tests", + value : "true:NoSchedule", + propagate_at_launch : true, + }, + ] + } ]) worker_groups_launch_template = [ diff --git a/terraform/wifi-289708231103/cloudsdk_cicd/variables.tf b/terraform/wifi-289708231103/cloudsdk_cicd/variables.tf index 4c9cdfb..77768bb 100644 --- a/terraform/wifi-289708231103/cloudsdk_cicd/variables.tf +++ b/terraform/wifi-289708231103/cloudsdk_cicd/variables.tf @@ -59,6 +59,11 @@ variable "testing_big_instance_type" { default = "m5a.xlarge" } +variable "testing_owls_instance_type" { + type = string + default = "c6a.2xlarge" +} + variable "spot_instance_types" { type = list(string) default = ["t3.small"]