Skip to content
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

Fix deletion of svclb DaemonSet when Service is deleted #5824

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

brandond
Copy link
Contributor

@brandond brandond commented Jul 8, 2022

Proposed Changes

87e1806 removed the OwnerReferences
field from the DaemonSet, which makes sense since the Service may now be
in a different namespace than the DaemonSet and cross-namespace owner
references are not supported. Unfortunately, we were relying on
garbage collection to delete the DameonSet, so this started leaving
orphaned DaemonSets when Services were deleted.

We don't want to add an a Service OnRemove handler, since this will add
finalizers to all Services, not just LoadBalancers services, causing
conformance tests to fail. Instead, manage our own finalizers, and
restore the DaemonSet removal Event that was removed by the same commit.

Types of Changes

bugfix

Verification

See linked issue

Testing

Linked Issues

User-Facing Change

Fixed a regression that caused ServiceLB DaemonSets to remain present after their corresponding Services were deleted.
  Manual cleanup of orphaned `svclb-*` DaemonSets from the `kube-system` namespace may be necessary if any LoadBalancer Services were deleted while running an affected release.

Further Comments

@brandond brandond requested a review from a team as a code owner July 8, 2022 22:14
@brandond brandond force-pushed the fix_svclb_delete branch 3 times, most recently from 9d70c12 to 0f96487 Compare July 11, 2022 22:15
87e1806 removed the OwnerReferences
field from the DaemonSet, which makes sense since the Service may now be
in a different namespace than the DaemonSet and cross-namespace owner
references are not supported.  Unfortunately, we were relying on
garbage collection to delete the DameonSet, so this started leaving
orphaned DaemonSets when Services were deleted.

We don't want to add an a Service OnRemove handler, since this will add
finalizers to all Services, not just LoadBalancers services, causing
conformance tests to fail. Instead, manage our own finalizers, and
restore the DaemonSet removal Event that was removed by the same commit.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond merged commit 167ed19 into k3s-io:master Jul 12, 2022
@brandond brandond deleted the fix_svclb_delete branch June 6, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants