-
Notifications
You must be signed in to change notification settings - Fork 26
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
Allow snapshot names to be rotated with most recent being named "_latest" #113
Comments
I just realized this isn't a trivial ask, since you cannot rename Kubernetes objects. About the only way I could envision it working is if any given snapshot schedule invocation created two at the same time. One with the usual naming, and one with a name of '-latest'. Of course, each invocation would have to delete the existing '-latest' before proceeding. |
For just the reason you mention (being able to easily reference the "latest"), I'd have much preferred a naming scheme like It would be possible to create a 2nd, "-latest" as you suggest, though I'm concerned about 2 things:
One interesting thing that's coming in kubernetes is the notion of "data populators." BTW, thanks for the feedback. Glad to see it's being used! |
Yeah, it was really the exact answer I needed for my use case! Well, almost exact. :) In my particular use case, the difference between "latest" and the "date stamp" version wouldn't matter. I just want to get "as close as possible" and keep a couple of old copies "just in case". The exact time of the backup isn't nearly as relevant. So even in that short time where there's no "latest", I could always manually go back to the one just before. And presumably, this would be something you could toggle on and off, since not everyone would need it. Regardless, thanks for putting this together! Even as is it's a great help. If I knew how to write Go, I'd take a stab at this feature request myself. But alas, I have to "serverfault" my way though bash scripting most of the time. |
I find this useful too to have one that as the lastest snapshot. is there a plan to include this feature? |
I don't have immediate plans to work on it, but I'd be happy to shepherd a contribution of this feature. |
Describe the feature you'd like to have.
We are using a scheduler to create regular (hourly) snapshots of a source volume. We have a stateful set that needs to create a volume (using the "volumeClaimTemplate" option). It would be very helpful if we could have the most recent snapshot created be named '-latest' instead of the timestamp.
What is the value to the end user? (why is it a priority?)
When using snapshots as part of a StatefulSet VolumeClaimTemplate, Kubernetes fails if you try to update the DataSource part of the VolumeClaim template. Say, for example, to use a more recent snapshot. The workaround it a bit dangerous and error prone: Delete the StatefulSet with
--cascade=false
and then re-create it with the newer snapshot ID.If we knew we could always expect our optimal snapshot to be suffixed with '-latest' (or something else obvious), we wouldn't need to change the datasource in the StatefulSet's VolumeClaimTemplate.
How will we know we have a good solution? (acceptance criteria)
When we can increase the replica count of a StatefulSet and have it always use the most recent snapshot as it's datasource for the PVC.
Additional context
Not sure if this is a bit of an edge case, but it would be super-useful for things like blockchains. Each node has a huge ledger volume. The closer to"now" that we can get when provisioning the volumes for additional pods, the faster the pods can be up and ready.
The text was updated successfully, but these errors were encountered: