Skip to content

Commit

Permalink
Fix target group instances registration when TG created
Browse files Browse the repository at this point in the history
In case of creating a new TG removed return dropped off this function
just before instance registration code. Daemon restart was needed to
call ensureTargetGroup() again and reach out registration code
(as targetGroup != nil, TG already created)

Change-Id: I57717602624d9632049596e6928ac4671387905d
  • Loading branch information
abubyr committed Jan 28, 2022
1 parent 454ed78 commit 16d121e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/providers/v1/aws_loadbalancer.go
Expand Up @@ -618,8 +618,7 @@ func (c *Cloud) ensureTargetGroup(targetGroup *elbv2.TargetGroup, serviceName ty
return nil, fmt.Errorf("expected only one target group on CreateTargetGroup, got %d groups", len(result.TargetGroups))
}

tg := result.TargetGroups[0]
return tg, nil
targetGroup = result.TargetGroups[0]
}

// handle instances in service
Expand Down

0 comments on commit 16d121e

Please sign in to comment.