Documentation ¶
Index ¶
- func AddAnnotations(o *metav1.ObjectMeta, vals map[string]string)
- func GetAnnotationFromSnapshot(itemSnapshot interface{}) (string, error)
- func GetKubeClient(config *rest.Config, logger logrus.FieldLogger) (*kubernetes.Clientset, error)
- func GetSnapshotFromPVCAnnotation(snapshotAnnotation string, itemSnapshot interface{}) error
- func RetrieveStorageClassMapping(config *rest.Config, veleroNs string, logger logrus.FieldLogger) (map[string]string, error)
- func SelfLinkToCRDName(selfLink string) string
- func UpdateSnapshotWithNewNamespace(itemSnapshot *backupdriverv1.Snapshot, namespace string) (backupdriverv1.Snapshot, error)
- func UpdateSnapshotWithNewStorageClass(config *rest.Config, itemSnapshot *backupdriverv1.Snapshot, ...) (backupdriverv1.Snapshot, error)
Constants ¶
This section is empty.
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 GetKubeClient ¶
func GetKubeClient(config *rest.Config, logger logrus.FieldLogger) (*kubernetes.Clientset, error)
func SelfLinkToCRDName ¶
* Converts a K8S Self Link into the CRD name. Supports namespaced and cluster level CRs * K8S Cluster Resource Self Link format: /api/<version>/<resource plural name>/<item name>, * e.g. /api/v1/persistentvolumes/pvc-3240e5ed-9a97-446c-a6ab-b2442d852d04 * K8S Namespace resource Self Link format: /api/<version>/namespaces/<namespace>/<resource plural name>/<item name>, * e.g. /api/v1/namespaces/kibishii/persistentvolumeclaims/etcd0-pv-claim * K8S Resource Name = <resource plural name>, e.g. persistentvolumes * Custom Resource Cluster Self Link format: /apis/<CR group>/<version>/<CR plural name>/<item name>, * e.g. /api/cnsdp.vmware.com/v1/backuprepositories/br-1 * Custom Resource Namespace Self Link format: /apis/<CR group>/<version>/namespaces/<namespace>/<CR plural name>/<item name>, * e.g. /apis/velero.io/v1/namespaces/velero/backups/kibishii-1 * Custom Resource Name = <CR plural name>.<CR group>, e.g. backups.velero.io
func UpdateSnapshotWithNewNamespace ¶
func UpdateSnapshotWithNewNamespace(itemSnapshot *backupdriverv1.Snapshot, namespace string) (backupdriverv1.Snapshot, error)
func UpdateSnapshotWithNewStorageClass ¶
func UpdateSnapshotWithNewStorageClass(config *rest.Config, itemSnapshot *backupdriverv1.Snapshot, storageClassMapping map[string]string, logger logrus.FieldLogger) (backupdriverv1.Snapshot, error)
Types ¶
This section is empty.