Documentation
¶
Index ¶
- func AwsEtcdEndpoint(etcdDomain string) string
- func AzureEtcdEndpoint(etcdDomain string) string
- func BackupPrefix(clusterID string) string
- func CAFile(clusterID string, tmpDir string) string
- func CertFile(clusterID string, tmpDir string) string
- func CheckClusterVersionSupport(clusterID string, provider string, crdCLient *versioned.Clientset) (bool, error)
- func ClearTMPDir(tmpDir string)
- func CreateCRDClient(logger micrologger.Logger) (*versioned.Clientset, error)
- func CreateCertFiles(clusterID string, certConfig *k8sclient.TLSClientConfig, tmpDir string) error
- func CreateK8sClient(logger micrologger.Logger) (kubernetes.Interface, error)
- func CreateTMPDir() (string, error)
- func FetchCerts(clusterID string, k8sClient kubernetes.Interface) (*k8sclient.TLSClientConfig, error)
- func GetAllGuestClusters(provider string, crdCLient *versioned.Clientset) ([]string, error)
- func GetEtcdEndpoint(clusterID string, provider string, crdCLient *versioned.Clientset) (string, error)
- func IsFailedBackupError(err error) bool
- func IsInvalidProvider(err error) bool
- func KVMEtcdEndpoint(etcdDomain string) string
- func KeyFile(clusterID string, tmpDir string) string
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwsEtcdEndpoint ¶
func AzureEtcdEndpoint ¶
func BackupPrefix ¶
func CheckClusterVersionSupport ¶
func CheckClusterVersionSupport(clusterID string, provider string, crdCLient *versioned.Clientset) (bool, error)
check if cluster release version has guest cluster backup support
func CreateCRDClient ¶
func CreateCRDClient(logger micrologger.Logger) (*versioned.Clientset, error)
create CRD client to access k8s crd resources cluster
func CreateCertFiles ¶
func CreateCertFiles(clusterID string, certConfig *k8sclient.TLSClientConfig, tmpDir string) error
create cert files in tmp dir from certConfig and saves filenames back
func CreateK8sClient ¶
func CreateK8sClient(logger micrologger.Logger) (kubernetes.Interface, error)
create k8s client to access host k8s cluster
func CreateTMPDir ¶
Create temporary directory where all file related magic happens.
func FetchCerts ¶
func FetchCerts(clusterID string, k8sClient kubernetes.Interface) (*k8sclient.TLSClientConfig, error)
fetch etcd client certs
func GetAllGuestClusters ¶
fetch all guest clusters ids in host cluster
func GetEtcdEndpoint ¶
func GetEtcdEndpoint(clusterID string, provider string, crdCLient *versioned.Clientset) (string, error)
fetch guest cluster etcd endpoint
func IsFailedBackupError ¶
IsInvalidConfig asserts invalidConfigError.
func IsInvalidProvider ¶
IsInvalidConfig asserts invalidConfigError.
func KVMEtcdEndpoint ¶
Types ¶
type Service ¶
type Service struct { Logger micrologger.Logger AwsAccessKey string AwsSecretKey string AwsS3Bucket string AwsS3Region string EtcdV2DataDir string EtcdV3Cert string EtcdV3CACert string EtcdV3Key string EtcdV3Endpoints string EncryptPass string Prefix string Provider string PrometheusConfig *config.PrometheusConfig Help bool SkipV2 bool }
func CreateService ¶
func CreateService(f config.Flags, logger micrologger.Logger) *Service
func (*Service) BackupGuestClusters ¶
backup all guest clusters etcd
func (*Service) BackupHostCluster ¶
backup host cluster etcd
Click to show internal directories.
Click to hide internal directories.