Documentation ¶
Index ¶
- func CheckAllKeysExistInSecret(secret *corev1.Secret, keys ...string) (string, bool)
- func GenerateStorageCertEnv(ns string, useKMS bool, provider v1alpha1.StorageProvider, ...) ([]corev1.EnvVar, string, error)
- func GenerateTidbPasswordEnv(ns, tcName, tidbSecretName string, useKMS bool, kubeCli kubernetes.Interface) ([]corev1.EnvVar, string, error)
- func GetBackupBucketName(backup *v1alpha1.Backup) (string, string, error)
- func GetBackupDataPath(provider v1alpha1.StorageProvider) (string, string, error)
- func GetBackupPrefixName(backup *v1alpha1.Backup) (string, string, error)
- func GetStorageType(provider v1alpha1.StorageProvider) v1alpha1.BackupStorageType
- func ParseImage(image string) (string, string)
- func ValidateBackup(backup *v1alpha1.Backup, tikvImage string) error
- func ValidateRestore(restore *v1alpha1.Restore, tikvImage string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAllKeysExistInSecret ¶
CheckAllKeysExistInSecret check if all keys are included in the specific secret return the not-exist keys join by ","
func GenerateStorageCertEnv ¶
func GenerateStorageCertEnv(ns string, useKMS bool, provider v1alpha1.StorageProvider, kubeCli kubernetes.Interface) ([]corev1.EnvVar, string, error)
GenerateStorageCertEnv generate the env info in order to access backend backup storage
func GenerateTidbPasswordEnv ¶
func GenerateTidbPasswordEnv(ns, tcName, tidbSecretName string, useKMS bool, kubeCli kubernetes.Interface) ([]corev1.EnvVar, string, error)
GenerateTidbPasswordEnv generate the password EnvVar
func GetBackupBucketName ¶
GetBackupBucketName return the bucket name for remote storage
func GetBackupDataPath ¶
func GetBackupDataPath(provider v1alpha1.StorageProvider) (string, string, error)
GetBackupDataPath return the full path of backup data
func GetBackupPrefixName ¶
GetBackupPrefixName return the prefix for remote storage
func GetStorageType ¶
func GetStorageType(provider v1alpha1.StorageProvider) v1alpha1.BackupStorageType
GetStorageType return the backup storage type according to the specified StorageProvider
func ParseImage ¶
ParseImage returns the image name and the tag from the input image string
func ValidateBackup ¶
ValidateBackup validates backup sepc
Types ¶
This section is empty.