-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ELB/TargetGroup/ASG attachment fixes #10138
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@hakman can you test this commit out? |
No luck. Same thing. |
@hakman did some troubleshooting and discovered that we used to be correctly passing the AWS LoadBalancerName when attaching LBs to ASGs. the LoadBalancerName is the truncated name we pass in CreateLoadBalancer and gets a kops/upup/pkg/fi/cloudup/awstasks/load_balancer_attachment.go Lines 64 to 66 in f3ea21a
#9794 changed that such that we now try to pass the original Name (the kops task name) to the Attach call which fails. kops/pkg/model/awsmodel/autoscalinggroup.go Lines 356 to 358 in b7f66a6
Lines 88 to 91 in b7f66a6
kops/upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go Lines 279 to 281 in b7f66a6
So we need to update the ASG task to try to use the LoadBalancerName field of the LB task, fetching it from AWS if we don't yet know it. External load balancers coming from the InstanceGroupSpec are the LoadBalancerName so we set that field when setting up the ASG task, but only the task name is known for the API load balancer so My last commit in this PR aims to accomplish that. |
abd323d
to
8e626cc
Compare
Usually this is an "actual.Foo = e.Foo" one-liner but we don't know which LB attached to an ASG is the API ELB so it's a bit more complicated
/cc @rdrgmnzs |
/lgtm |
ref: #10134 (comment)
This addresses three issues:
--target direct
update cluster
s were reporting changes because whenFind
ing the LBs attached to the ASG, we couldn't tell which was the API ELB and which were external ELBs passed in through the InstanceGroupSpec. Find now looks for the API ELB to decide whether an ELB attached to the ASG should be the API ELB task or an external ELB task.