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

Introducing a ReclaimPolicy for ephemerally created Volume resource #1153

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ushabelgur
Copy link
Contributor

Proposed Changes

  • Add ReclaimPolicy for ephemerally created Volume resource with 2 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
  • By default ReclaimPolicy would be assumed to be Delete to not to not break current behavior.
  • OwnerReference is added to ephemerally created volume only in case of ReclaimPolicy is set to Delete
  • Add wrapper type for VolumeTemplateSpec to support ReclaimPolicy type along with existing VolumeSpec
  • Add Test cases
    [Note: volume_release_controller is already taking care of releasing volumes whose claimer doesn't existing, by setting .spec.claimRef to nil when claimer Machine object is deleted. So not adding any extra logic for this]

Fixes #1114

@ushabelgur ushabelgur self-assigned this Nov 14, 2024
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 Volume resources
1 participant