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

Introduce ReclaimPolicy for ephemeral VirtualIP #1222

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Rohit-0505
Copy link
Contributor

  • Add ReclaimPolicy for ephemerally created virtualIP resource with below supported modes:
    • Retain: the resource is not deleted after the managing resource has been deleted
    • Delete: the current behavior, the resource is garbage-collected when the managing resource has been deleted
  • The default ReclaimPolicy is considered Delete not to break current behavior.
  • Add wrapper type for VirtualIPTemplateSpec to support ReclaimPolicy type along with existing VirtualIPSpec
  • OwnerReference is set to an ephemerally created virtualIP with ReclaimPolicyTypeDelete.
  • To prevent deletion of ephemeral vip without ownerReference a RESTDeleteStrategy method ValidateDelete is added in the strategy.go
  • Add Test cases
    [Note: virtualIP_release_controller is already taking care of releasing virtualIP whose claimer doesn't exist, by setting .spec.targetRef to nil when claimer NetworkInterface object is deleted. So not adding any extra logic for this]

Fixes #1115

@Rohit-0505 Rohit-0505 requested a review from a team as a code owner January 21, 2025 08:17
@lukas016 lukas016 force-pushed the osc/enh-ephemeral-vip-reclaim branch from b3d3d90 to ac02826 Compare January 21, 2025 08:36
@lukas016 lukas016 force-pushed the osc/enh-ephemeral-vip-reclaim branch from ac02826 to 39cc4d4 Compare January 21, 2025 08:58
@Rohit-0505 Rohit-0505 self-assigned this Jan 21, 2025
@afritzler afritzler changed the title Introduce ReclaimPolicy for ephemeral virtualIP Introduce ReclaimPolicy for ephemeral VirtualIP Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce a reclaim policy for ephemerally created Virtual IP resources
2 participants