Documentation
¶
Index ¶
- func AddVeleroExcludeLabelToObjectMeta(objectMeta *metav1.ObjectMeta)
- func AppendVeleroExcludeLabels(origLabels map[string]string) map[string]string
- func CompareVersion(currentVersion string, minVersion string) int
- func ConvertConfigClusterFlavor(flavor string) constants.ClusterFlavor
- func CreateKubeClientSet() (*kubernetes.Clientset, error)
- func CreatePluginClientSet() (*plugin_clientset.Clientset, error)
- func DeleteSvcSnapshot(svcSnapshotName string, gcSnapshotName string, gcSnapshotNamespace string, ...) error
- func GetBackupdriverClient(config *rest.Config) (v1alpha1.BackupdriverV1alpha1Interface, error)
- func GetBool(str string, defValue bool) bool
- func GetCSIClusterType(kubeClient kubernetes.Interface) (constants.ClusterFlavor, error)
- func GetCSIClusterTypeFromEnv(containers []k8sv1.Container) (constants.ClusterFlavor, error)
- func GetCSIInstalledVersion(kubeClient kubernetes.Interface) (string, error)
- func GetCSIVersionFromImage(containers []k8sv1.Container) (string, error)
- func GetClusterFlavor(config *rest.Config) (constants.ClusterFlavor, error)
- func GetClusterTypeFromConfig(kubeClient kubernetes.Interface, veleroNs string, configName string) (constants.ClusterFlavor, error)
- func GetComponentFromImage(image string, component string) string
- func GetComponentsFromImage(image string) map[string]string
- func GetDefaultS3PETM(logger logrus.FieldLogger) (*s3repository.ProtectedEntityTypeManager, error)
- func GetIVDPETMFromParamsMap(params map[string]interface{}, logger logrus.FieldLogger) (astrolabe.ProtectedEntityTypeManager, error)
- func GetKubeClientConfig() (*rest.Config, error)
- func GetKubeClientSet(config *rest.Config) (kubernetes.Interface, error)
- func GetS3PETMFromParamsMap(params map[string]interface{}, logger logrus.FieldLogger) (*s3repository.ProtectedEntityTypeManager, error)
- func GetS3SessionOptionsFromParamsMap(params map[string]interface{}, logger logrus.FieldLogger) (session.Options, error)
- func GetSecretNamespaceAndName(kubeClient kubernetes.Interface, veleroNs string, configName string) (string, string)
- func GetStringFromParamsMap(params map[string]interface{}, key string, logger logrus.FieldLogger) (value string, ok bool)
- func GetSupervisorConfig(guestConfig *rest.Config, logger logrus.FieldLogger) (*rest.Config, string, error)
- func GetSupervisorParameters(config *rest.Config, ns string, logger logrus.FieldLogger) (map[string]string, error)
- func GetUploadCRRetryMaximum(config *rest.Config, logger logrus.FieldLogger) int
- func GetUploadCRRetryMaximumFromConfig(kubeClient kubernetes.Interface, veleroNs string, configName string, ...) int
- func GetVcConfigSecretFilterFunc(logger logrus.FieldLogger) func(obj interface{}) bool
- func GetVeleroNamespace() (string, bool)
- func GetVersionFromImage(containers []k8sv1.Container, imageName string) string
- func IsFeatureEnabled(clientset kubernetes.Interface, feature string, defValue bool, ...) bool
- func NewVeleroK8sClient(config *rest.Config) (client.Client, error)
- func ParseConfig(secret *k8sv1.Secret, params map[string]interface{}, logger logrus.FieldLogger) error
- func PatchUpload(req *datamover_api.Upload, mutate func(*datamover_api.Upload), ...) (*datamover_api.Upload, error)
- func RetrieveBSLFromBackup(ctx context.Context, backupName string, config *rest.Config, ...) (string, error)
- func RetrieveClusterFlavor(config *rest.Config, veleroNs string) (constants.ClusterFlavor, error)
- func RetrieveParamsFromBSL(repositoryParams map[string]string, bslName string, config *rest.Config, ...) error
- func RetrievePodNodesByVolumeId(volumeId string) (string, error)
- func RetrieveVSLFromVeleroBSLs(params map[string]interface{}, bslName string, config *rest.Config, ...) error
- func RetrieveVcConfigSecret(params map[string]interface{}, config *rest.Config, logger logrus.FieldLogger) error
- func RetrieveVddkLogLevel(params map[string]interface{}, logger logrus.FieldLogger) error
- type ClientConfigNotFoundError
- type NotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddVeleroExcludeLabelToObjectMeta ¶ added in v1.1.0
func AddVeleroExcludeLabelToObjectMeta(objectMeta *metav1.ObjectMeta)
Adds the Velero label to exclude this K8S resource from the backup
func AppendVeleroExcludeLabels ¶ added in v1.1.0
func CompareVersion ¶ added in v1.2.0
If currentVersion < minVersion, return -1 If currentVersion == minVersion, return 0 If currentVersion > minVersion, return 1 Assume input versions are both valid
func ConvertConfigClusterFlavor ¶ added in v1.3.0
func ConvertConfigClusterFlavor(flavor string) constants.ClusterFlavor
func CreateKubeClientSet ¶ added in v1.2.0
func CreateKubeClientSet() (*kubernetes.Clientset, error)
func CreatePluginClientSet ¶ added in v1.2.0
func CreatePluginClientSet() (*plugin_clientset.Clientset, error)
func DeleteSvcSnapshot ¶ added in v1.1.0
func DeleteSvcSnapshot(svcSnapshotName string, gcSnapshotName string, gcSnapshotNamespace string, guestConfig *rest.Config, logger logrus.FieldLogger) error
Provide a utility function in guest cluster to clean up corresponding supervisor cluster snapshot CR
func GetBackupdriverClient ¶ added in v1.1.0
func GetBackupdriverClient(config *rest.Config) (v1alpha1.BackupdriverV1alpha1Interface, error)
func GetCSIClusterType ¶ added in v1.2.0
func GetCSIClusterType(kubeClient kubernetes.Interface) (constants.ClusterFlavor, error)
func GetCSIClusterTypeFromEnv ¶ added in v1.2.0
func GetCSIClusterTypeFromEnv(containers []k8sv1.Container) (constants.ClusterFlavor, error)
func GetCSIInstalledVersion ¶ added in v1.2.0
func GetCSIInstalledVersion(kubeClient kubernetes.Interface) (string, error)
func GetCSIVersionFromImage ¶ added in v1.2.0
func GetClusterFlavor ¶ added in v1.1.0
func GetClusterFlavor(config *rest.Config) (constants.ClusterFlavor, error)
func GetClusterTypeFromConfig ¶ added in v1.3.0
func GetClusterTypeFromConfig(kubeClient kubernetes.Interface, veleroNs string, configName string) (constants.ClusterFlavor, error)
func GetComponentFromImage ¶ added in v1.1.0
func GetComponentsFromImage ¶ added in v1.1.0
func GetDefaultS3PETM ¶ added in v1.1.0
func GetDefaultS3PETM(logger logrus.FieldLogger) (*s3repository.ProtectedEntityTypeManager, error)
func GetIVDPETMFromParamsMap ¶
func GetIVDPETMFromParamsMap(params map[string]interface{}, logger logrus.FieldLogger) (astrolabe.ProtectedEntityTypeManager, error)
func GetKubeClientConfig ¶ added in v1.2.0
func GetKubeClientSet ¶ added in v1.3.0
func GetKubeClientSet(config *rest.Config) (kubernetes.Interface, error)
func GetS3PETMFromParamsMap ¶
func GetS3PETMFromParamsMap(params map[string]interface{}, logger logrus.FieldLogger) (*s3repository.ProtectedEntityTypeManager, error)
func GetS3SessionOptionsFromParamsMap ¶ added in v1.1.1
func GetSecretNamespaceAndName ¶ added in v1.3.0
func GetStringFromParamsMap ¶
func GetSupervisorConfig ¶ added in v1.1.0
func GetSupervisorConfig(guestConfig *rest.Config, logger logrus.FieldLogger) (*rest.Config, string, error)
* Get the configuration to access the Supervisor namespace from the GuestCluster. * This routine will be called only for guest cluster. * * The secret to access the Supervisor Cluster will be written in the backup driver * namespace. The steps to get the Supervisor cluster config are: * 1. Create the backup-driver namespace if it does not exist. This is a fixed namespace * where the para virt backup driver secret will be written. * 2. Wait for the para virt backup driver secret to be written. * 3. Get the supervisor cluster configuration from the cert and token in the secret. * TODO: Handle update of the para virt backup driver secret
func GetSupervisorParameters ¶ added in v1.1.0
func GetSupervisorParameters(config *rest.Config, ns string, logger logrus.FieldLogger) (map[string]string, error)
* Get Supervisor parameters present as annotations in the supervisor namespace for the guest. * We do not return all the annotations, but only annotations required but guest cluster plugin.
func GetUploadCRRetryMaximum ¶ added in v1.5.2
func GetUploadCRRetryMaximum(config *rest.Config, logger logrus.FieldLogger) int
func GetUploadCRRetryMaximumFromConfig ¶ added in v1.5.2
func GetUploadCRRetryMaximumFromConfig(kubeClient kubernetes.Interface, veleroNs string, configName string, logger logrus.FieldLogger) int
func GetVcConfigSecretFilterFunc ¶ added in v1.1.0
func GetVcConfigSecretFilterFunc(logger logrus.FieldLogger) func(obj interface{}) bool
func GetVeleroNamespace ¶ added in v1.3.0
func GetVersionFromImage ¶ added in v1.2.0
Return version in the format: vX.Y.Z
func IsFeatureEnabled ¶ added in v1.1.0
func IsFeatureEnabled(clientset kubernetes.Interface, feature string, defValue bool, logger logrus.FieldLogger) bool
func NewVeleroK8sClient ¶ added in v1.7.0
NewVeleroK8sClient creates a controller-runtime client with the Velero v1 API types registered (in addition to core Kubernetes types). The default scheme used by client.New only knows core types, so without this helper any Get/List of Velero CRDs (e.g. BackupStorageLocation, Backup) fails with "no kind is registered for the type ... in scheme".
func ParseConfig ¶ added in v1.5.3
func PatchUpload ¶ added in v1.1.0
func PatchUpload(req *datamover_api.Upload, mutate func(*datamover_api.Upload), uploadClient datamover_client.UploadInterface, logger logrus.FieldLogger) (*datamover_api.Upload, error)
func RetrieveBSLFromBackup ¶ added in v1.1.0
func RetrieveClusterFlavor ¶ added in v1.3.0
func RetrieveParamsFromBSL ¶ added in v1.1.0
func RetrieveVSLFromVeleroBSLs ¶
func RetrieveVSLFromVeleroBSLs(params map[string]interface{}, bslName string, config *rest.Config, logger logrus.FieldLogger) error
* Retrieve the Volume Snapshot Location(VSL) as the remote storage location * for the data manager component in plugin from the Backup Storage Locations(BSLs) * of Velero. It will always pick up the first available one.
func RetrieveVcConfigSecret ¶
func RetrieveVddkLogLevel ¶ added in v1.2.0
func RetrieveVddkLogLevel(params map[string]interface{}, logger logrus.FieldLogger) error
Types ¶
type ClientConfigNotFoundError ¶ added in v1.2.0
type ClientConfigNotFoundError struct {
// contains filtered or unexported fields
}
func NewClientConfigNotFoundError ¶ added in v1.2.0
func NewClientConfigNotFoundError(errMsg string) ClientConfigNotFoundError
func (ClientConfigNotFoundError) Error ¶ added in v1.2.0
func (this ClientConfigNotFoundError) Error() string
type NotFoundError ¶ added in v1.0.1
type NotFoundError struct {
// contains filtered or unexported fields
}
func NewNotFoundError ¶ added in v1.0.1
func NewNotFoundError(errMsg string) NotFoundError
func (NotFoundError) Error ¶ added in v1.0.1
func (this NotFoundError) Error() string