Documentation ¶
Index ¶
- Constants
- func GetSnapshotContentNameForSnapshot(snapshot *crdv1.VolumeSnapshot) string
- func IsDefaultAnnotation(obj metav1.ObjectMeta) bool
- func IsSnapshotBound(snapshot *crdv1.VolumeSnapshot, content *crdv1.VolumeSnapshotContent) bool
- func NewCSISnapshotController(clientset clientset.Interface, client kubernetes.Interface, ...) *csiSnapshotController
- func NoResyncPeriodFunc() time.Duration
- type Handler
Constants ¶
View Source
const ( // Name of finalizer on VolumeSnapshotContents that are bound by VolumeSnapshots VolumeSnapshotContentFinalizer = "snapshot.storage.kubernetes.io/volumesnapshotcontent-protection" VolumeSnapshotFinalizer = "snapshot.storage.kubernetes.io/volumesnapshot-protection" )
View Source
const IsDefaultSnapshotClassAnnotation = "snapshot.storage.kubernetes.io/is-default-class"
View Source
const PVCFinalizer = "snapshot.storage.kubernetes.io/pvc-protection"
Name of finalizer on PVCs that have been used as a source to create VolumeSnapshots
Variables ¶
This section is empty.
Functions ¶
func GetSnapshotContentNameForSnapshot ¶
func GetSnapshotContentNameForSnapshot(snapshot *crdv1.VolumeSnapshot) string
GetSnapshotContentNameForSnapshot returns SnapshotContent.Name for the create VolumeSnapshotContent. The name must be unique.
func IsDefaultAnnotation ¶
func IsDefaultAnnotation(obj metav1.ObjectMeta) bool
IsDefaultAnnotation returns a boolean if the annotation is set
func IsSnapshotBound ¶
func IsSnapshotBound(snapshot *crdv1.VolumeSnapshot, content *crdv1.VolumeSnapshotContent) bool
IsSnapshotBound returns true/false if snapshot is bound
func NewCSISnapshotController ¶
func NewCSISnapshotController( clientset clientset.Interface, client kubernetes.Interface, snapshotterName string, volumeSnapshotInformer storageinformers.VolumeSnapshotInformer, volumeSnapshotContentInformer storageinformers.VolumeSnapshotContentInformer, volumeSnapshotClassInformer storageinformers.VolumeSnapshotClassInformer, pvcInformer coreinformers.PersistentVolumeClaimInformer, createSnapshotContentRetryCount int, createSnapshotContentInterval time.Duration, snapshotter snapshotter.Snapshotter, timeout time.Duration, resyncPeriod time.Duration, snapshotNamePrefix string, snapshotNameUUIDLength int, ) *csiSnapshotController
NewCSISnapshotController returns a new *csiSnapshotController
func NoResyncPeriodFunc ¶
NoResyncPeriodFunc Returns 0 for resyncPeriod in case resyncing is not needed.
Types ¶
type Handler ¶
type Handler interface { CreateSnapshot(snapshot *crdv1.VolumeSnapshot, volume *v1.PersistentVolume, parameters map[string]string, snapshotterCredentials map[string]string) (string, string, time.Time, int64, bool, error) DeleteSnapshot(content *crdv1.VolumeSnapshotContent, snapshotterCredentials map[string]string) error GetSnapshotStatus(content *crdv1.VolumeSnapshotContent) (bool, time.Time, int64, error) }
Handler is responsible for handling VolumeSnapshot events from informer.
func NewCSIHandler ¶
func NewCSIHandler( snapshotter snapshotter.Snapshotter, timeout time.Duration, snapshotNamePrefix string, snapshotNameUUIDLength int, ) Handler
NewCSIHandler returns a handler which includes the csi connection and Snapshot name details
Click to show internal directories.
Click to hide internal directories.