Skip to content

harsh-px/snapshot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Volume Snapshot Controller

Status

Pre-alpha

Quick Howto

Snapshot Volume Plugin Interface

As illustrated in example plugin hostPath

Plugin API

A Volume plugin must provide RegisterPlugin() to return plugin struct, GetPluginName() to return plugin name, and implement the following interface as illustrated in hostPath

type VolumePlugin interface {
	// Init inits volume plugin
	Init(cloudprovider.Interface)
	// SnapshotCreate creates a VolumeSnapshot from a PersistentVolumeSpec
	SnapshotCreate(*v1.PersistentVolumeSpec) (*tprv1.VolumeSnapshotDataSource, error)
	// SnapshotDelete deletes a VolumeSnapshot
	// PersistentVolume is provided for volume types, if any, that need PV Spec to delete snapshot
	SnapshotDelete(*tprv1.VolumeSnapshotDataSource, *v1.PersistentVolume) error
}

Volume Snapshot Data Source Spec

Each volume must also provide a Snapshot Data Source Spec and add to VolumeSnapshotDataSource, then declare support in GetSupportedVolumeFromPVC by returning the exact name as returned by the plugin's GetPluginName()

Invocation

The plugins are added to Snapshot controller cmd pkg.

Snapshot based PV Provisioner Volume Plugin Interface

TBD

About

Kubernetes Volume Snapshot Controller using Third Party Resource

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.2%
  • Other 0.8%