Documentation ¶
Index ¶
- Constants
- type ApiVersionFetcher
- type ApplicationCreator
- type ArgumentValidator
- type CSI
- type Cleaner
- type DataValidator
- type SnapshotCreator
- type SnapshotRestoreRunner
- func (r *SnapshotRestoreRunner) RunSnapshotRestore(ctx context.Context, args *types.CSISnapshotRestoreArgs) (*types.CSISnapshotRestoreResults, error)
- func (r *SnapshotRestoreRunner) RunSnapshotRestoreHelper(ctx context.Context, args *types.CSISnapshotRestoreArgs) (*types.CSISnapshotRestoreResults, error)
- type SnapshotRestoreStepper
Constants ¶
View Source
const ( // SnapGroupName describes the snapshot group name SnapGroupName = "snapshot.storage.k8s.io" // VolumeSnapshotClassResourcePlural describes volume snapshot classses VolumeSnapshotClassResourcePlural = "volumesnapshotclasses" // VolSnapClassAlphaDriverKey describes alpha driver key VolSnapClassAlphaDriverKey = "snapshotter" // VolSnapClassBetaDriverKey describes beta driver key VolSnapClassBetaDriverKey = "driver" DefaultPodImage = "ghcr.io/kastenhq/kubestr:latest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiVersionFetcher ¶
type ApiVersionFetcher interface {
GetCSISnapshotGroupVersion() (*metav1.GroupVersionForDiscovery, error)
}
type ApplicationCreator ¶
type ArgumentValidator ¶
type ArgumentValidator interface { ValidateNamespace(ctx context.Context, namespace string) error ValidateStorageClass(ctx context.Context, storageClass string) (*sv1.StorageClass, error) ValidateVolumeSnapshotClass(ctx context.Context, volumeSnapshotClass string, groupVersion *metav1.GroupVersionForDiscovery) (*unstructured.Unstructured, error) }
type CSI ¶
type CSI interface {
RunSnapshotRestore(ctx context.Context, args *types.CSISnapshotRestoreArgs) (*types.CSISnapshotRestoreResults, error)
}
type DataValidator ¶
type SnapshotCreator ¶
type SnapshotCreator interface { NewSnapshotter() (kansnapshot.Snapshotter, error) CreateSnapshot(ctx context.Context, snapshotter kansnapshot.Snapshotter, args *types.CreateSnapshotArgs) (*v1alpha1.VolumeSnapshot, error) CreateFromSourceCheck(ctx context.Context, snapshotter kansnapshot.Snapshotter, args *types.CreateFromSourceCheckArgs) error }
type SnapshotRestoreRunner ¶
type SnapshotRestoreRunner struct { KubeCli kubernetes.Interface DynCli dynamic.Interface // contains filtered or unexported fields }
func (*SnapshotRestoreRunner) RunSnapshotRestore ¶
func (r *SnapshotRestoreRunner) RunSnapshotRestore(ctx context.Context, args *types.CSISnapshotRestoreArgs) (*types.CSISnapshotRestoreResults, error)
func (*SnapshotRestoreRunner) RunSnapshotRestoreHelper ¶
func (r *SnapshotRestoreRunner) RunSnapshotRestoreHelper(ctx context.Context, args *types.CSISnapshotRestoreArgs) (*types.CSISnapshotRestoreResults, error)
type SnapshotRestoreStepper ¶
type SnapshotRestoreStepper interface { ValidateArgs(ctx context.Context, args *types.CSISnapshotRestoreArgs) error CreateApplication(ctx context.Context, args *types.CSISnapshotRestoreArgs, data string) (*v1.Pod, *v1.PersistentVolumeClaim, error) ValidateData(ctx context.Context, pod *v1.Pod, data string) error SnapshotApplication(ctx context.Context, args *types.CSISnapshotRestoreArgs, pvc *v1.PersistentVolumeClaim, snapshotName string) (*v1alpha1.VolumeSnapshot, error) RestoreApplication(ctx context.Context, args *types.CSISnapshotRestoreArgs, snapshot *v1alpha1.VolumeSnapshot) (*v1.Pod, *v1.PersistentVolumeClaim, error) Cleanup(ctx context.Context, results *types.CSISnapshotRestoreResults) }
Click to show internal directories.
Click to hide internal directories.