kubeclient

package
v10.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsControlPlaneNamespace

func IsControlPlaneNamespace(namespace string) bool

Types

type Interface

type Interface interface {
	BackupCluster(ctx context.Context, backupName string) error
	DrainAndDeleteWorker(ctx context.Context, hostname string) error
	DeleteMaster(hostname string) error
	EnsureSyncPod(ctx context.Context, syncImage string, hash []byte) error
	GetControlPlanePods(ctx context.Context) ([]corev1.Pod, error)
	WaitForReadyMaster(ctx context.Context, hostname string) error
	WaitForReadyWorker(ctx context.Context, hostname string) error
	WaitForReadySyncPod(ctx context.Context) error
}

Interface interface to utility kubenetes functions

func NewKubeclient

func NewKubeclient(log *logrus.Entry, config *v1.Config, disableKeepAlives bool) (Interface, error)

NewKubeclient creates a new kubeclient

type Kubeclientset

type Kubeclientset struct {
	Client kubernetes.Interface
	Seccli security.Interface
	Log    *logrus.Entry
}

func (*Kubeclientset) BackupCluster

func (u *Kubeclientset) BackupCluster(ctx context.Context, backupName string) error

func (*Kubeclientset) DeleteMaster

func (u *Kubeclientset) DeleteMaster(hostname string) error

func (*Kubeclientset) DrainAndDeleteWorker

func (u *Kubeclientset) DrainAndDeleteWorker(ctx context.Context, hostname string) error

func (*Kubeclientset) EnsureSyncPod

func (u *Kubeclientset) EnsureSyncPod(ctx context.Context, syncImage string, hash []byte) error

func (*Kubeclientset) GetControlPlanePods

func (u *Kubeclientset) GetControlPlanePods(ctx context.Context) ([]v1.Pod, error)

func (*Kubeclientset) WaitForReadyMaster

func (u *Kubeclientset) WaitForReadyMaster(ctx context.Context, hostname string) error

func (*Kubeclientset) WaitForReadySyncPod

func (u *Kubeclientset) WaitForReadySyncPod(ctx context.Context) error

func (*Kubeclientset) WaitForReadyWorker

func (u *Kubeclientset) WaitForReadyWorker(ctx context.Context, hostname string) error

type RetryingRoundTripper

type RetryingRoundTripper struct {
	Log *logrus.Entry
	http.RoundTripper
	Retries    int
	GetTimeout time.Duration
}

func (*RetryingRoundTripper) RoundTrip

func (rt *RetryingRoundTripper) RoundTrip(req *http.Request) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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