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

Add metadata.ownerReferences to all created VolumeSnapshots #359

Open
mnacharov opened this issue Apr 7, 2023 · 2 comments
Open

Add metadata.ownerReferences to all created VolumeSnapshots #359

mnacharov opened this issue Apr 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@mnacharov
Copy link

Describe the feature you'd like to have.

add ownerReferences to all VolumeSnapshots created from SnapshotSchedule

What is the value to the end user? (why is it a priority?)

  • k8s garbage collector will remove all VolumeSnapshots after deleting owner SnapshotSchedule
  • one can specify --cascade=orphan to kubectl delete command to disable garbage collecting
  • dependencies will be visible in ArgoCD-like solutions:

How will we know we have a good solution? (acceptance criteria)

It looks like a quite rare case for me when we would like to delete SnapshotSchedule but keep VolumeSnapshots. And kubectl delete command has an option to cover that need --cascade=orphan.

Additional context

ArgoCD shows SnapshotSchedule Dependents:
Screenshot 2023-04-07 at 15 21 09

@mnacharov mnacharov added the enhancement New feature or request label Apr 7, 2023
@mnacharov
Copy link
Author

Also we could implement some flag disableOwnerReferences in SnapshotSchedule resource to allow user disable this feature

@JohnStrunk
Copy link
Member

In the initial design, I intentionally avoided adding an owner reference to help users avoid accidentally deleting their snapshots. They can be cleaned up in bulk by deleting based on the schedule label.

I am open to revisiting the behavior, particularly if it provides value within gitops or other cluster/application management tooling.
Adding a flag to preserve the existing behavior would be important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants