Documentation ¶
Index ¶
- Constants
- func AddAnnotations(o *metav1.ObjectMeta, vals map[string]string)
- func AddLabels(o *metav1.ObjectMeta, vals map[string]string)
- func Contains(slice []string, key string) bool
- func GetClients() (*kubernetes.Clientset, *snapshotterClientSet.Clientset, error)
- func GetPVForPVC(pvc *corev1api.PersistentVolumeClaim, ...) (*corev1api.PersistentVolume, error)
- func GetPodVolumeNameForPVC(pod corev1api.Pod, pvcName string) (string, error)
- func GetPodsUsingPVC(pvcNamespace, pvcName string, corev1 corev1client.PodsGetter) ([]corev1api.Pod, error)
- func GetVolumeSnapshotClassForStorageClass(provisioner string, snapshotClient snapshotter.SnapshotV1Interface) (*snapshotv1api.VolumeSnapshotClass, error)
- func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnapshot, ...) (*snapshotv1api.VolumeSnapshotContent, error)
- func HasBackupLabel(o *metav1.ObjectMeta, backupName string) bool
- func IsPVCBackedUpByRestic(pvcNamespace, pvcName string, podClient corev1client.PodsGetter, ...) (bool, error)
- func IsVolumeSnapshotClassHasListerSecret(vc *snapshotv1api.VolumeSnapshotClass) bool
- func IsVolumeSnapshotContentHasDeleteSecret(vsc *snapshotv1api.VolumeSnapshotContent) bool
- func IsVolumeSnapshotExists(volSnap *snapshotv1api.VolumeSnapshot, ...) bool
- func IsVolumeSnapshotHasVSCDeleteSecret(vs *snapshotv1api.VolumeSnapshot) bool
- func SetVolumeSnapshotContentDeletionPolicy(vscName string, csiClient snapshotter.SnapshotV1Interface) error
Constants ¶
const ( VolumeSnapshotLabel = "velero.io/volume-snapshot-name" VolumeSnapshotHandleAnnotation = "velero.io/csi-volumesnapshot-handle" VolumeSnapshotRestoreSize = "velero.io/vsi-volumesnapshot-restore-size" CSIDriverNameAnnotation = "velero.io/csi-driver-name" CSIDeleteSnapshotSecretName = "velero.io/csi-deletesnapshotsecret-name" CSIDeleteSnapshotSecretNamespace = "velero.io/csi-deletesnapshotsecret-namespace" CSIVSCDeletionPolicy = "velero.io/csi-vsc-deletion-policy" VolumeSnapshotClassSelectorLabel = "velero.io/csi-volumesnapshot-class" // There is no release w/ these constants exported. Using the strings for now. // CSI Labels volumesnapshotclass // https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/utils/util.go#L59-L60 PrefixedSnapshotterListSecretNameKey = "csi.storage.k8s.io/snapshotter-list-secret-name" PrefixedSnapshotterListSecretNamespaceKey = "csi.storage.k8s.io/snapshotter-list-secret-namespace" // CSI Labels volumesnapshotcontents PrefixedSnapshotterSecretNameKey = "csi.storage.k8s.io/snapshotter-secret-name" PrefixedSnapshotterSecretNamespaceKey = "csi.storage.k8s.io/snapshotter-secret-namespace" )
Variables ¶
This section is empty.
Functions ¶
func AddAnnotations ¶
func AddAnnotations(o *metav1.ObjectMeta, vals map[string]string)
AddAnnotations adds the supplied key-values to the annotations on the object
func AddLabels ¶
func AddLabels(o *metav1.ObjectMeta, vals map[string]string)
AddLabels adds the supplied key-values to the labels on the object
func GetClients ¶
func GetClients() (*kubernetes.Clientset, *snapshotterClientSet.Clientset, error)
func GetPVForPVC ¶
func GetPVForPVC(pvc *corev1api.PersistentVolumeClaim, corev1 corev1client.PersistentVolumesGetter) (*corev1api.PersistentVolume, error)
func GetPodVolumeNameForPVC ¶
func GetPodsUsingPVC ¶
func GetPodsUsingPVC(pvcNamespace, pvcName string, corev1 corev1client.PodsGetter) ([]corev1api.Pod, error)
func GetVolumeSnapshotClassForStorageClass ¶
func GetVolumeSnapshotClassForStorageClass(provisioner string, snapshotClient snapshotter.SnapshotV1Interface) (*snapshotv1api.VolumeSnapshotClass, error)
GetVolumeSnapshotClassForStorageClass returns a VolumeSnapshotClass for the supplied volume provisioner/ driver name.
func GetVolumeSnapshotContentForVolumeSnapshot ¶
func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnapshot, snapshotClient snapshotter.SnapshotV1Interface, log logrus.FieldLogger, shouldWait bool) (*snapshotv1api.VolumeSnapshotContent, error)
GetVolumeSnapshotContentForVolumeSnapshot returns the volumesnapshotcontent object associated with the volumesnapshot
func HasBackupLabel ¶ added in v0.2.0
func HasBackupLabel(o *metav1.ObjectMeta, backupName string) bool
func IsPVCBackedUpByRestic ¶
func IsPVCBackedUpByRestic(pvcNamespace, pvcName string, podClient corev1client.PodsGetter, defaultVolumesToRestic bool) (bool, error)
func IsVolumeSnapshotClassHasListerSecret ¶
func IsVolumeSnapshotClassHasListerSecret(vc *snapshotv1api.VolumeSnapshotClass) bool
IsVolumeSnapshotClassHasListerSecret returns whether a volumesnapshotclass has a snapshotlister secret
func IsVolumeSnapshotContentHasDeleteSecret ¶
func IsVolumeSnapshotContentHasDeleteSecret(vsc *snapshotv1api.VolumeSnapshotContent) bool
IsVolumeSnapshotContentHasDeleteSecret returns whether a volumesnapshotcontent has a deletesnapshot secret
func IsVolumeSnapshotExists ¶ added in v0.1.2
func IsVolumeSnapshotExists(volSnap *snapshotv1api.VolumeSnapshot, snapshotClient snapshotter.SnapshotV1Interface) bool
IsVolumeSnapshotExists returns whether a specific volumesnapshot object exists.
func IsVolumeSnapshotHasVSCDeleteSecret ¶
func IsVolumeSnapshotHasVSCDeleteSecret(vs *snapshotv1api.VolumeSnapshot) bool
IsVolumeSnapshotHasVSCDeleteSecret returns whether a volumesnapshot should set the deletesnapshot secret for the static volumesnapshotcontent that is created on restore
func SetVolumeSnapshotContentDeletionPolicy ¶ added in v0.2.0
func SetVolumeSnapshotContentDeletionPolicy(vscName string, csiClient snapshotter.SnapshotV1Interface) error
Types ¶
This section is empty.