kale
kale copied to clipboard
(Backend): Add ability to create a snapshot of a pod
Part of https://github.com/kubeflow-kale/kale/pull/217/files
This PR adds the ability to snapshot all the volumes connected to a pod, along with writing the container images of that pod to the snapshot metadata.
Note, at the moment the snapshot name is pod-snapshot-
+ pvc_name
. This means snapshotting a pod twice will result in an error as the snapshot with that name already exists. This will need to be solved with a UUID of some sorts, I was hoping to find one that is useful/meaningful for other methods of identification as well, so I am open to suggestions.
@StefanoFioravanzo I believe this PR is ready for merging
@StefanoFioravanzo I have added a small function to generate 8 character long UUID's to ensure snapshot names are unique and to be able to have multiple "versions" of snapshots for a pod.