{"id":18806270,"url":"https://github.com/rootfs/snapshot","last_synced_at":"2025-04-13T19:13:04.926Z","repository":{"id":71035841,"uuid":"92431324","full_name":"rootfs/snapshot","owner":"rootfs","description":"Kubernetes Volume Snapshot Controller using Custom Resource Definition","archived":false,"fork":false,"pushed_at":"2017-09-20T17:29:42.000Z","size":34979,"stargazers_count":12,"open_issues_count":3,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T09:51:59.243Z","etag":null,"topics":["kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootfs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-25T18:15:06.000Z","updated_at":"2020-02-14T20:21:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d715458-0eb3-4c31-957e-4b9b2864b0b6","html_url":"https://github.com/rootfs/snapshot","commit_stats":{"total_commits":95,"total_committers":7,"mean_commits":"13.571428571428571","dds":"0.28421052631578947","last_synced_commit":"ef9bc7b34e1c4409ac87a5d49b6f4bf3a60b15f9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fsnapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fsnapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fsnapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fsnapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootfs","download_url":"https://codeload.github.com/rootfs/snapshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766745,"owners_count":21158301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes"],"created_at":"2024-11-07T22:48:03.196Z","updated_at":"2025-04-13T19:12:59.916Z","avatar_url":"https://github.com/rootfs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Volume Snapshot Controller\n\n## Status\n\nNo longer maintained. Please use https://github.com/kubernetes-incubator/external-storage/\n\n## Demo\n\n - [SIG PM 06/13/2017](https://youtu.be/7-mBY_ZitS8?t=24m41s)\n\n\n## Quick Howto\n\n - [Host Path](examples/hostpath/README.md)\n\n - [AWS EBS](examples/aws/README.md)\n\n\n## Snapshot Volume Plugin Interface\n\nAs illustrated in example plugin [hostPath](pkg/volume/hostpath/processor.go)\n\n### Plugin API\n\nA Volume plugin must provide `RegisterPlugin()` to return plugin struct, `GetPluginName()` to return plugin name, and implement the following interface as illustrated in [hostPath](pkg/volume/hostpath/processor.go)\n\n```go\nimport (\n\t\"k8s.io/client-go/pkg/api/v1\"\n\n\tcrdv1 \"github.com/rootfs/snapshot/pkg/apis/crd/v1\"\n\t\"github.com/rootfs/snapshot/pkg/cloudprovider\"\n)\n\ntype VolumePlugin interface {\n\t// Init inits volume plugin\n\tInit(cloudprovider.Interface)\n\t// SnapshotCreate creates a VolumeSnapshot from a PersistentVolumeSpec\n\tSnapshotCreate(*v1.PersistentVolume) (*crdv1.VolumeSnapshotDataSource, error)\n\t// SnapshotDelete deletes a VolumeSnapshot\n\t// PersistentVolume is provided for volume types, if any, that need PV Spec to delete snapshot\n\tSnapshotDelete(*crdv1.VolumeSnapshotDataSource, *v1.PersistentVolume) error\n\t// SnapshotRestore restores (promotes) a volume snapshot into a volume\n\tSnapshotRestore(*crdv1.VolumeSnapshotData, *v1.PersistentVolumeClaim, string, map[string]string) (*v1.PersistentVolumeSource, map[string]string, error)\n\t// Describe volume snapshot status.\n\t// return true if the snapshot is ready\n\tDescribeSnapshot(snapshotData *crdv1.VolumeSnapshotData) (isCompleted bool, err error)\n\t// VolumeDelete deletes a PV\n\t// TODO in the future pass kubernetes client for certain volumes (e.g. rbd) so they can access storage class to retrieve secret\n\tVolumeDelete(pv *v1.PersistentVolume) error\n}\n```\n\n### Volume Snapshot Data Source Spec\n\nEach volume must also provide a Snapshot Data Source Spec and add to [VolumeSnapshotDataSource](pkg/apis/crd/v1/types.go), then declare support in [GetSupportedVolumeFromPVC](pkg/apis/crd/v1/types.go) by returning the exact name as returned by the plugin's `GetPluginName()`\n\n### Invocation\nThe plugins are added to Snapshot controller [cmd pkg](cmd/snapshot-controller/snapshot-controller.go).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootfs%2Fsnapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootfs%2Fsnapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootfs%2Fsnapshot/lists"}