Documentation
¶
Index ¶
- Constants
- func BuildAWSCredentials(accessKeyID, secretAccessKey string) ([]byte, error)
- func BuildStoreFileSystem(ctx context.Context, clientset kubernetes.Interface, kotsadmNamespace string) (*types.StoreFileSystem, error)
- func CheckKotsadmVeleroAccess(ctx context.Context, kotsadmNamespace string) (requiresAccess bool, finalErr error)
- func ConfigureStore(ctx context.Context, options ConfigureStoreOptions) (*types.Store, error)
- func CreateFileSystemMinioBucket(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error
- func CreateInstanceBackup(ctx context.Context, options CreateInstanceBackupOptions) error
- func DeployFileSystemMinio(ctx context.Context, clientset kubernetes.Interface, ...) error
- func DetectVeleroNamespace(ctx context.Context, clientset kubernetes.Interface, kotsadmNamespace string) (string, error)
- func EnsureVeleroNamespaceConfigMap(ctx context.Context, clientset kubernetes.Interface, veleroNamespace string, ...) error
- func EnsureVeleroPermissions(ctx context.Context, clientset kubernetes.Interface, veleroNamespace string, ...) error
- func FindBackupStoreLocation(ctx context.Context, kotsadmNamespace string) (*velerov1.BackupStorageLocation, error)
- func GetCurrentFileSystemConfig(ctx context.Context, namespace string) (*types.FileSystemConfig, error)
- func GetGlobalStore(ctx context.Context, kotsadmNamepsace string, ...) (*types.Store, error)
- func ListInstanceBackups(ctx context.Context, options ListInstanceBackupsOptions) ([]velerov1.Backup, error)
- func ListInstanceRestores(ctx context.Context, options ListInstanceRestoresOptions) ([]velerov1.Restore, error)
- func Redact(store *types.Store) error
- func RestoreInstanceBackup(ctx context.Context, options RestoreInstanceBackupOptions) (*velerov1.Restore, error)
- func TryGetVeleroNamespaceFromConfigMap(ctx context.Context, clientset kubernetes.Interface, kotsadmNamespace string) string
- type ConfigureStoreOptions
- type CreateInstanceBackupOptions
- type FileSystemDeployOptions
- type InvalidStoreDataError
- type ListInstanceBackupsOptions
- type ListInstanceRestoresOptions
- type ResetFileSystemError
- type RestoreInstanceBackupOptions
- type ValidateStoreOptions
- type VeleroRBACResponse
- type VeleroStatus
Constants ¶
const (
FileSystemMinioConfigMapName, FileSystemMinioSecretName = "kotsadm-fs-minio", "kotsadm-fs-minio-creds"
FileSystemMinioDeploymentName, FileSystemMinioServiceName = "kotsadm-fs-minio", "kotsadm-fs-minio"
FileSystemMinioProvider, FileSystemMinioBucketName, FileSystemMinioRegion = "aws", "velero", "minio"
FileSystemMinioServicePort = 9000
)
const (
VeleroNamespaceConfigMapName = "kotsadm-velero-namespace"
)
Variables ¶
This section is empty.
Functions ¶
func BuildAWSCredentials ¶
func BuildStoreFileSystem ¶ added in v1.33.0
func BuildStoreFileSystem(ctx context.Context, clientset kubernetes.Interface, kotsadmNamespace string) (*types.StoreFileSystem, error)
func ConfigureStore ¶
func CreateFileSystemMinioBucket ¶
func CreateFileSystemMinioBucket(ctx context.Context, clientset kubernetes.Interface, namespace string, registryOptions kotsadmtypes.KotsadmOptions) error
func CreateInstanceBackup ¶
func CreateInstanceBackup(ctx context.Context, options CreateInstanceBackupOptions) error
func DeployFileSystemMinio ¶
func DeployFileSystemMinio(ctx context.Context, clientset kubernetes.Interface, deployOptions FileSystemDeployOptions, registryOptions kotsadmtypes.KotsadmOptions) error
func DetectVeleroNamespace ¶
func DetectVeleroNamespace(ctx context.Context, clientset kubernetes.Interface, kotsadmNamespace string) (string, error)
DetectVeleroNamespace will detect and validate the velero namespace kotsadmNamespace is only required in minimal rbac installations. if empty, cluster scope privileges will be needed to detect and validate velero
func EnsureVeleroPermissions ¶
func FindBackupStoreLocation ¶
func FindBackupStoreLocation(ctx context.Context, kotsadmNamespace string) (*velerov1.BackupStorageLocation, error)
FindBackupStoreLocation will find the backup storage location used by velero kotsadmNamespace is only required in minimal rbac installations. if empty, cluster scope privileges will be needed to detect and validate velero
func GetGlobalStore ¶
func GetGlobalStore(ctx context.Context, kotsadmNamepsace string, kotsadmVeleroBackendStorageLocation *velerov1.BackupStorageLocation) (*types.Store, error)
GetGlobalStore will return the global store from kotsadmVeleroBackupStorageLocation or will find it, if the param is nil
func ListInstanceBackups ¶
func ListInstanceRestores ¶
func RestoreInstanceBackup ¶
func TryGetVeleroNamespaceFromConfigMap ¶
func TryGetVeleroNamespaceFromConfigMap(ctx context.Context, clientset kubernetes.Interface, kotsadmNamespace string) string
TryGetVeleroNamespaceFromConfigMap in the case of minimal rbac installations, a configmap containing the velero namespace will be created once the user gives kotsadm access to velero using the cli
Types ¶
type ConfigureStoreOptions ¶
type ConfigureStoreOptions struct { Provider string Bucket string Path string CACertData []byte AWS *types.StoreAWS Google *types.StoreGoogle Azure *types.StoreAzure Other *types.StoreOther Internal bool FileSystem bool KotsadmNamespace string RegistryOptions *kotsadmtypes.KotsadmOptions // If set to true, will validate the endpoint and the bucket using a pod instead (when applicable). // Will be ignored if SkipValidation is set to true. ValidateUsingAPod bool SkipValidation bool }
type FileSystemDeployOptions ¶
type FileSystemDeployOptions struct { Namespace string IsOpenShift bool ForceReset bool FileSystemConfig types.FileSystemConfig }
type InvalidStoreDataError ¶
type InvalidStoreDataError struct {
Message string
}
func (*InvalidStoreDataError) Error ¶
func (e *InvalidStoreDataError) Error() string
type ListInstanceBackupsOptions ¶
type ListInstanceBackupsOptions struct {
Namespace string
}
type ListInstanceRestoresOptions ¶
type ListInstanceRestoresOptions struct {
Namespace string
}
type ResetFileSystemError ¶
type ResetFileSystemError struct {
Message string
}
func (ResetFileSystemError) Error ¶
func (e ResetFileSystemError) Error() string
type ValidateStoreOptions ¶
type ValidateStoreOptions struct { KotsadmNamespace string RegistryOptions *kotsadmtypes.KotsadmOptions CACertData []byte // If set to true, will validate the endpoint and the bucket using a pod instead (when applicable) ValidateUsingAPod bool }
type VeleroRBACResponse ¶
type VeleroStatus ¶
type VeleroStatus struct { Version string Plugins []string Status string Namespace string VeleroPod string ResticPods []string ResticVersion string ResticStatus string }
func DetectVelero ¶
func DetectVelero(ctx context.Context, kotsadmNamespace string) (*VeleroStatus, error)
func (*VeleroStatus) ContainsPlugin ¶
func (s *VeleroStatus) ContainsPlugin(plugin string) bool