Skip to content

Commit

Permalink
clean up invalid target groups (#476)
Browse files Browse the repository at this point in the history
fixes: #475

Given that there is only one TG and it is of type IP created by the stack, we are not callling `updateTargetGroupsForAutoScalingGroup` -> `detachTargetGroupsFromAutoScalingGroup`

This possible solution is to move this guard inside `updateTargetGroupsForAutoScalingGroup` - see #475 (comment)

However, the  guard introduced in #141 is practically present now inside `updateTargetGroupsForAutoScalingGroup`  introduced by #436 and therefore we can simply remove it.

Tested in lab clusters.

Signed-off-by: Samuel Lang <[email protected]>
  • Loading branch information
universam1 authored Feb 10, 2022
1 parent 9f2db47 commit 5e0fd6b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions aws/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,6 @@ func (a *Adapter) UpdateTargetGroupsAndAutoScalingGroups(stacks []*Stack, proble

// remove the IP TGs from the list keeping all other TGs including problematic #127 and nonexistent #436
targetGroupARNs := difference(allTargetGroupARNs, targetTypesARNs[elbv2.TargetTypeEnumIp])
// don't do anything if there are no target groups
if len(targetGroupARNs) == 0 {
return
}

ownerTags := map[string]string{
clusterIDTagPrefix + a.ClusterID(): resourceLifecycleOwned,
Expand Down

0 comments on commit 5e0fd6b

Please sign in to comment.