Documentation ¶
Index ¶
- Constants
- func GetAWSClient() (*ec2.EC2, error)
- func GetApplicationBackupLabels(backup *storkapi.ApplicationBackup, pvc *v1.PersistentVolumeClaim) map[string]string
- func GetApplicationRestoreLabels(restore *storkapi.ApplicationRestore, ...) map[string]string
- func GetDefaultDriverName() string
- func GetEBSVolume(volumeID string, filters map[string]string, client *ec2.EC2) (*ec2.Volume, error)
- func GetEBSVolumeID(pv *v1.PersistentVolume) string
- func GetGCPZones(pv *v1.PersistentVolume) []string
- func GetNodeRegion() (string, error)
- func GetNodeZone() (string, error)
- func GetNodeZones() ([]string, error)
- func GetPVCDriver(coreOps core.Ops, pvc *v1.PersistentVolumeClaim) (string, error)
- func GetPVCDriverForBackup(coreOps core.Ops, pvc *v1.PersistentVolumeClaim, cmBackupType string, ...) (string, error)
- func GetPVCFromObjects(objects []runtime.Unstructured, ...) (*v1.PersistentVolumeClaim, error)
- func GetPVDriver(pv *v1.PersistentVolume) (string, error)
- func GetRegionalZones(zones string) []string
- func GetSnapshotType(snap *snapv1.VolumeSnapshot) string
- func GetVolumeBackupZones(volumeBackupInfos []*storkapi.ApplicationBackupVolumeInfo) []string
- func IsCSIDriverWithoutSnapshotSupport(pv *v1.PersistentVolume) bool
- func IsNodeMatch(k8sNode *v1.Node, driverNode *NodeInfo) bool
- func IsRegional(zone string) bool
- func MapZones(sourceZones, destZones []string) map[string]string
- func Register(name string, d Driver) error
- type BackupRestoreNotSupported
- func (b *BackupRestoreNotSupported) CancelBackup(*storkapi.ApplicationBackup) error
- func (b *BackupRestoreNotSupported) CancelRestore(*storkapi.ApplicationRestore) error
- func (b *BackupRestoreNotSupported) CleanupBackupResources(*storkapi.ApplicationBackup) error
- func (b *BackupRestoreNotSupported) CleanupRestoreResources(*storkapi.ApplicationRestore) error
- func (b *BackupRestoreNotSupported) DeleteBackup(*storkapi.ApplicationBackup) (bool, error)
- func (b *BackupRestoreNotSupported) GetBackupStatus(*storkapi.ApplicationBackup) ([]*storkapi.ApplicationBackupVolumeInfo, error)
- func (b *BackupRestoreNotSupported) GetPreRestoreResources(*storkapi.ApplicationBackup, *storkapi.ApplicationRestore, ...) ([]runtime.Unstructured, error)
- func (b *BackupRestoreNotSupported) GetRestoreStatus(*storkapi.ApplicationRestore) ([]*storkapi.ApplicationRestoreVolumeInfo, error)
- func (b *BackupRestoreNotSupported) StartBackup(*storkapi.ApplicationBackup, []v1.PersistentVolumeClaim) ([]*storkapi.ApplicationBackupVolumeInfo, error)
- func (b *BackupRestoreNotSupported) StartRestore(*storkapi.ApplicationRestore, []*storkapi.ApplicationBackupVolumeInfo, ...) ([]*storkapi.ApplicationRestoreVolumeInfo, error)
- type BackupRestorePluginInterface
- type CloneNotSupported
- type ClonePluginInterface
- type ClusterDomainsNotSupported
- type ClusterDomainsPluginInterface
- type ClusterPairNotSupported
- type ClusterPairPluginInterface
- type Driver
- type ErrBackupExists
- type ErrPVCPending
- type ErrStorageProviderBusy
- type GroupSnapshotCreateResponse
- type GroupSnapshotNotSupported
- func (g *GroupSnapshotNotSupported) CreateGroupSnapshot(*storkapi.GroupVolumeSnapshot) (*GroupSnapshotCreateResponse, error)
- func (g *GroupSnapshotNotSupported) DeleteGroupSnapshot(*storkapi.GroupVolumeSnapshot) error
- func (g *GroupSnapshotNotSupported) GetGroupSnapshotStatus(*storkapi.GroupVolumeSnapshot) (*GroupSnapshotCreateResponse, error)
- type GroupSnapshotPluginInterface
- type Info
- type MigratePluginInterface
- type MigrationNotSupported
- func (m *MigrationNotSupported) CancelMigration(*storkapi.Migration) error
- func (m *MigrationNotSupported) GetMigrationStatus(*storkapi.Migration) ([]*storkapi.MigrationVolumeInfo, error)
- func (m *MigrationNotSupported) StartMigration(*storkapi.Migration) ([]*storkapi.MigrationVolumeInfo, error)
- func (m *MigrationNotSupported) UpdateMigratedPersistentVolumeSpec(*v1.PersistentVolume) (*v1.PersistentVolume, error)
- type NodeInfo
- type NodeStatus
- type SnapshotRestoreNotSupported
- func (s *SnapshotRestoreNotSupported) CleanupSnapshotRestoreObjects(*storkapi.VolumeSnapshotRestore) error
- func (s *SnapshotRestoreNotSupported) CompleteVolumeSnapshotRestore(snap *storkapi.VolumeSnapshotRestore) error
- func (s *SnapshotRestoreNotSupported) GetVolumeSnapshotRestoreStatus(*storkapi.VolumeSnapshotRestore) error
- func (s *SnapshotRestoreNotSupported) StartVolumeSnapshotRestore(*storkapi.VolumeSnapshotRestore) error
- type SnapshotRestorePluginInterface
Constants ¶
const ( // PortworxDriverName is the name of the portworx driver implementation PortworxDriverName = "pxd" // AWSDriverName is the name of the aws driver implementation AWSDriverName = "aws" // AzureDriverName is the name of the azure driver implementation AzureDriverName = "azure" // CSIDriverName is the name of the k8s driver implementation. CSIDriverName = "csi" // GCEDriverName is the name of the gcp driver implementation GCEDriverName = "gce" // LinstorDriverName is the name of the Linstor driver implementation LinstorDriverName = "linstor" // KDMPDriverName is the name of the kdmp driver implementation KDMPDriverName = "kdmp" // ZoneSeperator zone separator ZoneSeperator = "__" // EbsProvisionerName EBS provisioner name EbsProvisionerName = "kubernetes.io/aws-ebs" )
Variables ¶
This section is empty.
Functions ¶
func GetAWSClient ¶
GetAWSClient client handle for EC2 instance
func GetApplicationBackupLabels ¶
func GetApplicationBackupLabels( backup *storkapi.ApplicationBackup, pvc *v1.PersistentVolumeClaim, ) map[string]string
GetApplicationBackupLabels Gets the labels that need to be applied to a snapshot when creating a backup
func GetApplicationRestoreLabels ¶
func GetApplicationRestoreLabels( restore *storkapi.ApplicationRestore, volumeInfo *storkapi.ApplicationRestoreVolumeInfo, ) map[string]string
GetApplicationRestoreLabels Gets the labels that need to be applied to a volume when restoring from a backup
func GetDefaultDriverName ¶
func GetDefaultDriverName() string
GetDefaultDriverName returns the default driver name in case on isn't set
func GetEBSVolume ¶
GetEBSVolume gets EBS volume
func GetEBSVolumeID ¶
func GetEBSVolumeID(pv *v1.PersistentVolume) string
GetEBSVolumeID get EBS vol ID
func GetGCPZones ¶
func GetGCPZones(pv *v1.PersistentVolume) []string
GetGCPZones get zones from GCP
func GetNodeZones ¶
GetNodeZones - get zone details of the nodes in the cluster.
func GetPVCDriver ¶
GetPVCDriver gets the driver associated with a PVC. Returns ErrNotFound if the PVC is not owned by any available driver
func GetPVCDriverForBackup ¶
func GetPVCDriverForBackup(coreOps core.Ops, pvc *v1.PersistentVolumeClaim, cmBackupType string, crBackupType string, ) (string, error)
GetPVCDriverForBackup gets the driver associated with a PVC for backup operation. Returns ErrNotSupported if the PVC is not owned by any available driver
func GetPVCFromObjects ¶
func GetPVCFromObjects(objects []runtime.Unstructured, volumeBackupInfo *storkapi.ApplicationBackupVolumeInfo) (*v1.PersistentVolumeClaim, error)
GetPVCFromObjects gets the pvc object from the objects for a particular volume
func GetPVDriver ¶
func GetPVDriver(pv *v1.PersistentVolume) (string, error)
GetPVDriver gets the driver associated with a PV. Returns ErrNotFound if the PV is not owned by any available driver
func GetRegionalZones ¶
GetRegionalZones kist of regional zone
func GetSnapshotType ¶
func GetSnapshotType(snap *snapv1.VolumeSnapshot) string
GetSnapshotType gets the snapshot type
func GetVolumeBackupZones ¶
func GetVolumeBackupZones( volumeBackupInfos []*storkapi.ApplicationBackupVolumeInfo, ) []string
GetVolumeBackupZones - Get zone details from the volumeBackupInfo
func IsCSIDriverWithoutSnapshotSupport ¶
func IsCSIDriverWithoutSnapshotSupport(pv *v1.PersistentVolume) bool
IsCSIDriverWithoutSnapshotSupport - check whether CSI PV supports snapshot This function will called in csi driver and kdmp volume driver. In csi driver, this api is called to default to kdmp by not owning in CSI driver. In kdmp driver, this api is called to decide whether we need to set the volumesnapclass, to try local snapshot first.
func IsNodeMatch ¶
IsNodeMatch There are a couple of things that need to be checked to see if the driver node matched the k8s node since different k8s installs set the node name, hostname and IPs differently
Types ¶
type BackupRestoreNotSupported ¶
type BackupRestoreNotSupported struct{}
BackupRestoreNotSupported to be used by drivers that don't support backup
func (*BackupRestoreNotSupported) CancelBackup ¶
func (b *BackupRestoreNotSupported) CancelBackup(*storkapi.ApplicationBackup) error
CancelBackup returns ErrNotSupported
func (*BackupRestoreNotSupported) CancelRestore ¶
func (b *BackupRestoreNotSupported) CancelRestore(*storkapi.ApplicationRestore) error
CancelRestore returns ErrNotSupported
func (*BackupRestoreNotSupported) CleanupBackupResources ¶
func (b *BackupRestoreNotSupported) CleanupBackupResources(*storkapi.ApplicationBackup) error
CleanupBackupResources returns ErrNotSupported
func (*BackupRestoreNotSupported) CleanupRestoreResources ¶
func (b *BackupRestoreNotSupported) CleanupRestoreResources(*storkapi.ApplicationRestore) error
CleanupRestoreResources returns ErrNotSupported
func (*BackupRestoreNotSupported) DeleteBackup ¶
func (b *BackupRestoreNotSupported) DeleteBackup(*storkapi.ApplicationBackup) (bool, error)
DeleteBackup returns ErrNotSupported
func (*BackupRestoreNotSupported) GetBackupStatus ¶
func (b *BackupRestoreNotSupported) GetBackupStatus(*storkapi.ApplicationBackup) ([]*storkapi.ApplicationBackupVolumeInfo, error)
GetBackupStatus returns ErrNotSupported
func (*BackupRestoreNotSupported) GetPreRestoreResources ¶
func (b *BackupRestoreNotSupported) GetPreRestoreResources( *storkapi.ApplicationBackup, *storkapi.ApplicationRestore, []runtime.Unstructured, ) ([]runtime.Unstructured, error)
GetPreRestoreResources returns ErrNotSupported
func (*BackupRestoreNotSupported) GetRestoreStatus ¶
func (b *BackupRestoreNotSupported) GetRestoreStatus(*storkapi.ApplicationRestore) ([]*storkapi.ApplicationRestoreVolumeInfo, error)
GetRestoreStatus returns ErrNotSupported
func (*BackupRestoreNotSupported) StartBackup ¶
func (b *BackupRestoreNotSupported) StartBackup( *storkapi.ApplicationBackup, []v1.PersistentVolumeClaim, ) ([]*storkapi.ApplicationBackupVolumeInfo, error)
StartBackup returns ErrNotSupported
func (*BackupRestoreNotSupported) StartRestore ¶
func (b *BackupRestoreNotSupported) StartRestore( *storkapi.ApplicationRestore, []*storkapi.ApplicationBackupVolumeInfo, []runtime.Unstructured, ) ([]*storkapi.ApplicationRestoreVolumeInfo, error)
StartRestore returns ErrNotSupported
type BackupRestorePluginInterface ¶
type BackupRestorePluginInterface interface { // Start backup of volumes specified by the spec. Should only backup // volumes, not the specs associated with them StartBackup(*storkapi.ApplicationBackup, []v1.PersistentVolumeClaim) ([]*storkapi.ApplicationBackupVolumeInfo, error) // Get the status of backup of the volumes specified in the status // for the backup spec GetBackupStatus(*storkapi.ApplicationBackup) ([]*storkapi.ApplicationBackupVolumeInfo, error) // Cancel the backup of volumes specified in the status CancelBackup(*storkapi.ApplicationBackup) error // CleanupBackupResources the backup of resource specified backup CleanupBackupResources(*storkapi.ApplicationBackup) error // Delete the backups specified in the status DeleteBackup(*storkapi.ApplicationBackup) (bool, error) // Get any resources that should be created before the restore is started GetPreRestoreResources(*storkapi.ApplicationBackup, *storkapi.ApplicationRestore, []runtime.Unstructured) ([]runtime.Unstructured, error) // Start restore of volumes specified by the spec. Should only restore // volumes, not the specs associated with them StartRestore(*storkapi.ApplicationRestore, []*storkapi.ApplicationBackupVolumeInfo, []runtime.Unstructured) ([]*storkapi.ApplicationRestoreVolumeInfo, error) // Get the status of restore of the volumes specified in the status // for the restore spec GetRestoreStatus(*storkapi.ApplicationRestore) ([]*storkapi.ApplicationRestoreVolumeInfo, error) // Cancel the restore of volumes specified in the status CancelRestore(*storkapi.ApplicationRestore) error // CleanupRestoreResources for specigied restore CleanupRestoreResources(*storkapi.ApplicationRestore) error }
BackupRestorePluginInterface Interface to backup and restore volumes
type CloneNotSupported ¶
type CloneNotSupported struct{}
CloneNotSupported to be used by drivers that don't support volume clone
func (*CloneNotSupported) CreateVolumeClones ¶
func (c *CloneNotSupported) CreateVolumeClones(*storkapi.ApplicationClone) error
CreateVolumeClones returns ErrNotSupported
type ClonePluginInterface ¶
type ClonePluginInterface interface {
CreateVolumeClones(*storkapi.ApplicationClone) error
}
ClonePluginInterface Interface to clone volumes
type ClusterDomainsNotSupported ¶
type ClusterDomainsNotSupported struct{}
ClusterDomainsNotSupported to be used by drivers that don't support cluster domains
func (*ClusterDomainsNotSupported) ActivateClusterDomain ¶
func (c *ClusterDomainsNotSupported) ActivateClusterDomain(*storkapi.ClusterDomainUpdate) error
ActivateClusterDomain activates a cluster domain
func (*ClusterDomainsNotSupported) DeactivateClusterDomain ¶
func (c *ClusterDomainsNotSupported) DeactivateClusterDomain(*storkapi.ClusterDomainUpdate) error
DeactivateClusterDomain deactivates a cluster domain
func (*ClusterDomainsNotSupported) GetClusterDomains ¶
func (c *ClusterDomainsNotSupported) GetClusterDomains() (*storkapi.ClusterDomains, error)
GetClusterDomains returns all the cluster domains and their status
type ClusterDomainsPluginInterface ¶
type ClusterDomainsPluginInterface interface { // GetClusterDomains returns all the cluster domains and their status GetClusterDomains() (*storkapi.ClusterDomains, error) // ActivateClusterDomain activates a cluster domain ActivateClusterDomain(*storkapi.ClusterDomainUpdate) error // DeactivateClusterDomain deactivates a cluster domain DeactivateClusterDomain(*storkapi.ClusterDomainUpdate) error }
ClusterDomainsPluginInterface Interface to manage cluster domains
type ClusterPairNotSupported ¶
type ClusterPairNotSupported struct{}
ClusterPairNotSupported to be used by drivers that don't support pairing
func (*ClusterPairNotSupported) CreatePair ¶
func (c *ClusterPairNotSupported) CreatePair(*storkapi.ClusterPair) (string, error)
CreatePair Returns ErrNotSupported
func (*ClusterPairNotSupported) DeletePair ¶
func (c *ClusterPairNotSupported) DeletePair(*storkapi.ClusterPair) error
DeletePair Returns ErrNotSupported
type ClusterPairPluginInterface ¶
type ClusterPairPluginInterface interface { // Create a pair with a remote cluster CreatePair(*storkapi.ClusterPair) (string, error) // Deletes a paring with a remote cluster DeletePair(*storkapi.ClusterPair) error }
ClusterPairPluginInterface Interface to pair clusters
type Driver ¶
type Driver interface { // Init initializes the volume driver. Init(interface{}) error // String returns the string name of this driver. String() string // InspectVolume returns information about a volume. InspectVolume(volumeID string) (*Info, error) // GetNodes Get the list of nodes where the driver is available GetNodes() ([]*NodeInfo, error) // InspectNode using ID InspectNode(id string) (*NodeInfo, error) // GetPodVolumes Get all the volumes used by a pod backed by the driver GetPodVolumes(*v1.PodSpec, string) ([]*Info, error) // GetVolumeClaimTemplates Get all the volume templates from the list backed by // the driver GetVolumeClaimTemplates([]v1.PersistentVolumeClaim) ([]v1.PersistentVolumeClaim, error) // OwnsPVC returns true if the PVC is owned by the driver OwnsPVC(coreOps core.Ops, pvc *v1.PersistentVolumeClaim) bool // OwnsPVCForBackup returns true if the PVC is owned by the driver // Since we have extra check need to done for backup case, added seperate version of API. OwnsPVCForBackup(coreOps core.Ops, pvc *v1.PersistentVolumeClaim, cmBackupType string, crBackupType string) bool // OwnsPV returns true if the PV is owned by the driver OwnsPV(pvc *v1.PersistentVolume) bool // GetSnapshotPlugin Get the snapshot plugin to be used for the driver GetSnapshotPlugin() snapshotVolume.Plugin // GetSnapshotType Get the type of the snapshot. Return error is snapshot // doesn't belong to driver GetSnapshotType(snap *snapv1.VolumeSnapshot) (string, error) // Stop the driver Stop() error // GetClusterID returns the clusterID for the driver GetClusterID() (string, error) // GroupSnapshotPluginInterface Interface for group snapshots GroupSnapshotPluginInterface // ClusterPairPluginInterface Interface to pair clusters ClusterPairPluginInterface // MigratePluginInterface Interface to migrate data between clusters MigratePluginInterface // ClusterDomainsPluginInterface Interface to manage cluster domains ClusterDomainsPluginInterface // BackupRestorePluginInterface Interface to backup and restore volumes BackupRestorePluginInterface // ClonePluginInterface Interface to clone volumes ClonePluginInterface // SnapshotRestorePluginInterface Interface to do in-place restore of volumes SnapshotRestorePluginInterface }
Driver defines an external volume driver interface. Any driver that wants to be used with stork needs to implement these interfaces.
type ErrBackupExists ¶
type ErrBackupExists struct { // UID of the backup UID string }
ErrBackupExists is returned when the backup already exists
func (*ErrBackupExists) Error ¶
func (e *ErrBackupExists) Error() string
type ErrPVCPending ¶
type ErrPVCPending struct { // Name of the PVC Name string }
ErrPVCPending PVC hasn't been bound yet
func (*ErrPVCPending) Error ¶
func (e *ErrPVCPending) Error() string
type ErrStorageProviderBusy ¶
type ErrStorageProviderBusy struct { // Reason for the error Reason string }
ErrStorageProviderBusy is returned when the storage provider cannot perform the requested operation
func (*ErrStorageProviderBusy) Error ¶
func (e *ErrStorageProviderBusy) Error() string
type GroupSnapshotCreateResponse ¶
type GroupSnapshotCreateResponse struct {
Snapshots []*storkapi.VolumeSnapshotStatus
}
GroupSnapshotCreateResponse is the response for the group snapshot operation
type GroupSnapshotNotSupported ¶
type GroupSnapshotNotSupported struct{}
GroupSnapshotNotSupported to be used by drivers that don't support group snapshots
func (*GroupSnapshotNotSupported) CreateGroupSnapshot ¶
func (g *GroupSnapshotNotSupported) CreateGroupSnapshot(*storkapi.GroupVolumeSnapshot) (*GroupSnapshotCreateResponse, error)
CreateGroupSnapshot returns ErrNotSupported
func (*GroupSnapshotNotSupported) DeleteGroupSnapshot ¶
func (g *GroupSnapshotNotSupported) DeleteGroupSnapshot(*storkapi.GroupVolumeSnapshot) error
DeleteGroupSnapshot returns ErrNotSupported
func (*GroupSnapshotNotSupported) GetGroupSnapshotStatus ¶
func (g *GroupSnapshotNotSupported) GetGroupSnapshotStatus(*storkapi.GroupVolumeSnapshot) (*GroupSnapshotCreateResponse, error)
GetGroupSnapshotStatus returns ErrNotSupported
type GroupSnapshotPluginInterface ¶
type GroupSnapshotPluginInterface interface { // CreateGroupSnapshot creates a group snapshot with the given pvcs CreateGroupSnapshot(snap *storkapi.GroupVolumeSnapshot) (*GroupSnapshotCreateResponse, error) // GetGroupSnapshotStatus returns status of group snapshot GetGroupSnapshotStatus(snap *storkapi.GroupVolumeSnapshot) (*GroupSnapshotCreateResponse, error) // DeleteGroupSnapshot delete a group snapshot with the given spec DeleteGroupSnapshot(snap *storkapi.GroupVolumeSnapshot) error }
GroupSnapshotPluginInterface is used to perform group snapshot operations
type Info ¶
type Info struct { // VolumeID is a unique identifier for the volume VolumeID string // VolumeName is the name for the volume VolumeName string // DataNodes is a list of nodes where the data for the volume resides DataNodes []string // Size is the size of the volume in GB Size uint64 // ParentID points to the ID of the parent volume for snapshots ParentID string // Labels are user applied labels on the volume Labels map[string]string // VolumeSourceRef is a optional reference to the source of the volume VolumeSourceRef interface{} }
Info Information about a volume
type MigratePluginInterface ¶
type MigratePluginInterface interface { // Start migration of volumes specified by the spec. Should only migrate // volumes, not the specs associated with them StartMigration(*storkapi.Migration) ([]*storkapi.MigrationVolumeInfo, error) // Get the status of migration of the volumes specified in the status // for the migration spec GetMigrationStatus(*storkapi.Migration) ([]*storkapi.MigrationVolumeInfo, error) // Cancel the migration of volumes specified in the status CancelMigration(*storkapi.Migration) error // Update the PVC spec to point to the migrated volume on the destination // cluster UpdateMigratedPersistentVolumeSpec(*v1.PersistentVolume, *storkapi.ApplicationRestoreVolumeInfo) (*v1.PersistentVolume, error) }
MigratePluginInterface Interface to migrate data between clusters
type MigrationNotSupported ¶
type MigrationNotSupported struct{}
MigrationNotSupported to be used by drivers that don't support migration
func (*MigrationNotSupported) CancelMigration ¶
func (m *MigrationNotSupported) CancelMigration(*storkapi.Migration) error
CancelMigration returns ErrNotSupported
func (*MigrationNotSupported) GetMigrationStatus ¶
func (m *MigrationNotSupported) GetMigrationStatus(*storkapi.Migration) ([]*storkapi.MigrationVolumeInfo, error)
GetMigrationStatus returns ErrNotSupported
func (*MigrationNotSupported) StartMigration ¶
func (m *MigrationNotSupported) StartMigration(*storkapi.Migration) ([]*storkapi.MigrationVolumeInfo, error)
StartMigration returns ErrNotSupported
func (*MigrationNotSupported) UpdateMigratedPersistentVolumeSpec ¶
func (m *MigrationNotSupported) UpdateMigratedPersistentVolumeSpec( *v1.PersistentVolume, ) (*v1.PersistentVolume, error)
UpdateMigratedPersistentVolumeSpec returns ErrNotSupported
type NodeInfo ¶
type NodeInfo struct { // StorageID is a unique identifier for the storage node StorageID string // SchedulerID is a unique identifier for the scheduler node SchedulerID string // Hostname of the node. Should be in lower case because Kubernetes // converts it to lower case Hostname string // IPs List of IPs associated with the node IPs []string // Rack Specifies the rack within the datacenter where the node is located Rack string // Zone Specifies the zone where the rack is located Zone string // Region Specifies the region where the datacenter is located Region string // Status of the node Status NodeStatus // RawStatus as returned by the driver RawStatus string }
NodeInfo Information about a node
func RemoveDuplicateOfflineNodes ¶
RemoveDuplicateOfflineNodes Removes duplicate offline nodes from the list which have the same IP as an online node
type NodeStatus ¶
type NodeStatus string
NodeStatus Status of driver on a node
const ( // NodeOnline Node is online NodeOnline NodeStatus = "Online" // NodeOffline Node is Offline NodeOffline NodeStatus = "Offline" // NodeDegraded Node is in degraded state NodeDegraded NodeStatus = "Degraded" )
type SnapshotRestoreNotSupported ¶
type SnapshotRestoreNotSupported struct{}
SnapshotRestoreNotSupported to be used by drivers that don't support volume snapshot restore
func (*SnapshotRestoreNotSupported) CleanupSnapshotRestoreObjects ¶
func (s *SnapshotRestoreNotSupported) CleanupSnapshotRestoreObjects(*storkapi.VolumeSnapshotRestore) error
CleanupSnapshotRestoreObjects deletes restore objects if any
func (*SnapshotRestoreNotSupported) CompleteVolumeSnapshotRestore ¶
func (s *SnapshotRestoreNotSupported) CompleteVolumeSnapshotRestore(snap *storkapi.VolumeSnapshotRestore) error
CompleteVolumeSnapshotRestore returns ErrNotSupported
func (*SnapshotRestoreNotSupported) GetVolumeSnapshotRestoreStatus ¶
func (s *SnapshotRestoreNotSupported) GetVolumeSnapshotRestoreStatus(*storkapi.VolumeSnapshotRestore) error
GetVolumeSnapshotRestoreStatus returns ErrNotSupported
func (*SnapshotRestoreNotSupported) StartVolumeSnapshotRestore ¶
func (s *SnapshotRestoreNotSupported) StartVolumeSnapshotRestore(*storkapi.VolumeSnapshotRestore) error
StartVolumeSnapshotRestore returns ErrNotSupported
type SnapshotRestorePluginInterface ¶
type SnapshotRestorePluginInterface interface { // StartVolumeSnapshotRestore will prepare volume for restore StartVolumeSnapshotRestore(*storkapi.VolumeSnapshotRestore) error // CompleteVolumeSnapshotRestore will perform in-place restore for given snapshot and associated pvc // Returns error if restore failed CompleteVolumeSnapshotRestore(*storkapi.VolumeSnapshotRestore) error // GetVolumeSnapshotRestore returns snapshot restore status GetVolumeSnapshotRestoreStatus(*storkapi.VolumeSnapshotRestore) error // CleanupSnapshotRestoreObjects deletes restore objects if any CleanupSnapshotRestoreObjects(*storkapi.VolumeSnapshotRestore) error }
SnapshotRestorePluginInterface Interface to perform in place restore of volume