-
Notifications
You must be signed in to change notification settings - Fork 562
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
Update LoadBalancerReadyCondition on deletion #3871
Update LoadBalancerReadyCondition on deletion #3871
Conversation
The LoadBalancerReadyCondition is sometimes explicitly patched and other times it only updates the awsCluster object. Furthermore the condition won't be patched by the patch helper in the AWSClusterReconciler, because it's not in the `patch.WithOwnedConditions` list. This change puts the condition in the list and also updates the condition reason to `Deleted` when the LB is not found. Without setting the condition in that case, the reconciler will set condition to `Deleting` and it will never go back to `Deleted`. Co-authored-by: Jose Armesto <github@armesto.net>
|
Welcome @mnitchev! |
Hi @mnitchev. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
/hold |
@Ankitasw what needs to be concluded with the discussion on Slack? Is there anything that's blocking this PR from moving ahead? We've been running with these changes included for a couple weeks now (based on the 1.5 branch) and it's been working as expected. |
/lgtm Final approve left for @richardcase :) |
@@ -171,6 +171,7 @@ func (r *AWSClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) | |||
patch.WithOwnedConditions{Conditions: []clusterv1.ConditionType{ | |||
infrav1.PrincipalCredentialRetrievedCondition, | |||
infrav1.PrincipalUsageAllowedCondition, | |||
infrav1.LoadBalancerReadyCondition, |
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.
Is this change really needed?
Does setting LoadBalancerReadyCondition
as done in loadbalancer.go would not suffice?
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.
Just asking this as there are many other conditions which are patched fine without this change, hence not added here.
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.
Our observation was that it didn't work without having the condition in that list. My understanding is that the patch helper will ignore conditions not owned by the controller. At least that's the impression I'm left with by the documentation here.
I'll double check, since it's been a while since I submitted this change.
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.
cc @richardcase if you have any opinions
/test ? |
@richardcase: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
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. |
This change seems reasonable to me. Lets check the e2e pass and then merge: /test pull-cluster-api-provider-aws-e2e |
Until the e2e pass: |
/approve @mnitchev @AverageMarcus - feel free to unhold when the e2e passes. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase 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 |
/cherrypick release-1.5 |
@richardcase: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you. In response to this:
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. |
E2E passed /hold cancel |
@richardcase: #3871 failed to apply on top of branch "release-1.5":
In response to this:
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. |
Apply #3871 "Update LoadBalancerReadyCondition on deletion" to release-1.5
What type of PR is this?
/kind bug
What this PR does / why we need it:
The LoadBalancerReadyCondition is sometimes explicitly patched and other times it only updates the awsCluster object. Furthermore the condition won't be patched by the patch helper in the AWSClusterReconciler, because it's not in the
patch.WithOwnedConditions
list. This change puts the condition in the list and also updates the condition reason toDeleted
when the LB is not found. Without setting the condition in that case, the reconciler will set condition toDeleting
and it will never go back toDeleted
.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 #3870
Special notes for your reviewer:
Checklist:
CC @fiunchinho