-
Notifications
You must be signed in to change notification settings - Fork 1.5k
pkg/asset/machines: Add load balancer refs to master machines on AWS #684
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
Conversation
pkg/asset/machines/aws/machines.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhinavdahiya not sure what you mean... are you asking if it should be in its own function that's not common with workers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do this here
installer/pkg/asset/machines/master.go
Lines 83 to 87 in 6a098fd
| machines, err := aws.Machines(ic, &pool, "master", "master-user-data") | |
| if err != nil { | |
| return errors.Wrap(err, "failed to create master machine objects") | |
| } | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, so you want the master-specific part to be placed in master.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes most sense. But also we need take into account that hive should be able to apply those changes too.
pkg/asset/machines/aws/machines.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to hard-code this? It currently matches this default from among these choices. But this code is far from that code. Can we push this setting up into a shared type (aws.MachinePool?) to stay DRY?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would not expose that in MachinePool and move
installer/pkg/tfvars/tfvars.go
Line 95 in 6a098fd
| Endpoints: aws.EndpointsAll, // Default value for endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhinavdahiya do you mean that I should make machines.Master a dependency of TerraformVariables and pass in the Machine object to TFVars ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhinavdahiya do you mean that I should make machines.Master a dependency of TerraformVariables and pass in the Machine object to TFVars ?
Yeah, but not in this PR, i don't think we need to do that now.
0704a23 to
6175028
Compare
|
@abhinavdahiya @wking addressed your comments |
|
This looks good to me, but I'll wait to give @abhinavdahiya another look at it to. What does this actually do? We set up the load-balancer associations ourselves, so is this just keeping new cluster-api-aws-provider from stomping on that and pulling us out of those load balancers? Or making newer cluster-api-aws-provider happier when they notice that we are attached to those load balancers? Or setting the stage for masters that are created via the cluster API? Or...? |
|
It’s meant to re-establish lb membership when a new master instance comes up in the case of a machine failure. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, csrwng The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Pulls the latest code from cluster-api-aws-provider and sets up publicIP and LoadBalancers on cluster machines.