-
Notifications
You must be signed in to change notification settings - Fork 584
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
feat: Bring your own control plane ELB #2787
feat: Bring your own control plane ELB #2787
Conversation
Skipping CI for Draft Pull Request. |
/ok-to-test |
7e6103c
to
2698362
Compare
/retest |
2698362
to
d7245a1
Compare
/retest |
e3bd15c
to
0dc29b0
Compare
0dc29b0
to
76d4b1d
Compare
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.
Looking good! A few minor comments
Another point of discussion: CAPA has to be able to update the ELB's instances. I think it's also ok the let CAPA make other updates to the ELB. However, as with other bring-your-own infrastructure, CAPA should not delete the ELB. |
In light of @richardcase's comments, I'd like to change the approach here: The AWSCluster controller should generate the ELB name and store it in the Spec. I considered this earlier, but found it awkward to implement with the existing |
This would be a similar approach to what we have taken elsewhere, i think this would be good. |
I've identified a new problem: The AWSCluster controller deletes the control plane ELB when the it deletes the cluster resources. It should not delete a user-created control-plane ELB. The controller needs to know whether the ELB is user-created or CAPA-created. If the new
|
I think we should be able to use the |
76d4b1d
to
cdd9ac6
Compare
For the API server ELB, the RegisterInstanceWithAPIServerELB function is used.
Previously, the function did not populate the API server ELB tags. The tags are now necessary to decide whether the API server ELB is managed or not.
The function was already specialized to list ELBs owned by the AWS cloud provider; the name is changed to reflect this.
Make the name reflect what the function does. Also add an explanatory comment.
…nd TestDeleteAWSCloudProviderELBs
Unfortunately, I just got another merge conflict, I think with #2900. It's a bit silly, because it appears to be just whitespace. I'm rebasing on main and force-pushing. |
b7185b9
to
138bcac
Compare
Re-running because I resolved the merge conflict and force-pushed: /test pull-cluster-api-provider-aws-e2e |
/hold /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: randomvariable 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 |
@dlipovetsky: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
GPU test is flaking #2905 |
/unhold |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Lets the user define the control plane ELB name, so that the AWSCluster controller can use an existing ELB.
If the ELB exists and does not have a tag that says it is owned by the cluster, then the controller treats the ELB as unmanaged: it does not reconcile the ELB's attributes, tags, or attached subnets.
If the ELB does not exist, the controller behaves as has in the past: It creates the ELB, marks the ELB as owned by the cluster, and treats it as managed: it reconciles the ELB's attributes, tags, and attached subnets.
If the user does not provide a name, the controller generates a name from the cluster name and writes it to the AWSCluster Spec.
Something else to note: If the user defines the name, but the ELB does not exist, then the controller creates an ELB with the user-defined name, and treats it as managed.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2774
Special notes for your reviewer:
I have tried to keep changes to a minimum, but despite that, the PR is large. I find it easier to review the commits one-by-one.
Checklist:
Release note: