recovery

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package recovery provides tooling to help with control plane disaster recovery. Recover() uses a Backend to extract the control plane from a store, such as etcd, and use those to write assets that can be used by `bootkube start` to reboot the control plane.

The recovery tool assumes that the component names for the control plane elements are the same as what is output by `bootkube render`. The `bootkube start` command also makes this assumption. It also assumes that kubeconfig on the kubelet is located at /etc/kubernetes/kubeconfig, though that can be changed in the bootstrap manifests that are rendered.

Index

Constants

View Source
const (
	RecoveryEtcdClientAddr = "http://localhost:52379"
)

Variables

This section is empty.

Functions

func CleanRecoveryEtcd added in v0.4.5

func CleanRecoveryEtcd(p string) error

CleanRecoveryEtcd removes the recovery etcd static pod manifest and stops the recovery etcd container.

func Recover

func Recover(ctx context.Context, backend Backend, kubeConfigPath string) (asset.Assets, error)

Recover recovers a control plane using the provided backend and kubeConfigPath, returning assets for the existing control plane and a bootstrap control plane that can be used with `bootkube start` to re-bootstrap the control plane.

func StartRecoveryEtcdForBackup added in v0.4.5

func StartRecoveryEtcdForBackup(p, backupPath string) error

StartRecoveryEtcdForBackup starts a recovery etcd container using given backup. The started etcd server listens on RecoveryEtcdClientAddr.

Types

type Backend

type Backend interface {
	// contains filtered or unexported methods
}

Backend defines an interface for any backend that can populate a controlPlane struct.

func NewAPIServerBackend

func NewAPIServerBackend(kubeConfigPath string) (Backend, error)

NewAPIServerBackend constructs a new backend to talk to the API server using the given kubeConfig.

TODO(diegs): support using a service account instead of a kubeconfig.

func NewEtcdBackend

func NewEtcdBackend(client *clientv3.Client, pathPrefix string) Backend

NewEtcdBackend constructs a new etcdBackend for the given client and pathPrefix.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL