From 1c1e27f058f17fe69dcde647415fde26a97189e7 Mon Sep 17 00:00:00 2001 From: Relk Li Date: Fri, 15 Mar 2024 11:06:43 +0800 Subject: [PATCH] FEATURE: exclude terminating node from alb target (#185) https://github.com/getamis/terraform-aws-asg-lifecycle/pull/5 To prevent 502/504 errors when worker node is terminating, remove the node from the ALB target group before termination. --- modules/aws/kube-master/main.tf | 2 +- modules/aws/kube-worker/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/aws/kube-master/main.tf b/modules/aws/kube-master/main.tf index 17a97d8..7650480 100644 --- a/modules/aws/kube-master/main.tf +++ b/modules/aws/kube-master/main.tf @@ -122,7 +122,7 @@ resource "aws_launch_template" "master" { module "lifecycle_hook" { count = var.enable_asg_life_cycle ? 1 : 0 - source = "git::ssh://git@github.com/getamis/terraform-aws-asg-lifecycle//modules/kubernetes?ref=v1.27.4.0" + source = "git::ssh://git@github.com/getamis/terraform-aws-asg-lifecycle//modules/kubernetes?ref=v1.27.4.1" name = "${var.name}-master" cluster_name = var.name diff --git a/modules/aws/kube-worker/main.tf b/modules/aws/kube-worker/main.tf index 2b96594..6c41c94 100644 --- a/modules/aws/kube-worker/main.tf +++ b/modules/aws/kube-worker/main.tf @@ -159,7 +159,7 @@ resource "aws_launch_template" "worker" { module "lifecycle_hook" { count = var.enable_asg_life_cycle ? 1 : 0 - source = "git::ssh://git@github.com/getamis/terraform-aws-asg-lifecycle//modules/kubernetes?ref=v1.27.4.0" + source = "git::ssh://git@github.com/getamis/terraform-aws-asg-lifecycle//modules/kubernetes?ref=v1.27.4.1" name = "${var.name}-worker-${var.instance_config["name"]}" cluster_name = var.name