kubernetes

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentContext

func CurrentContext() (string, error)

func GetClientset

func GetClientset() (kubernetes.Interface, error)

func IsRetryableAPIError added in v0.3.0

func IsRetryableAPIError(err error) bool

func StartPods added in v0.3.0

func StartPods(c kubernetes.Interface, namespace string, pod v1.Pod, waitForRunning bool) error

func WaitForDeploymentToStabilize added in v0.3.0

func WaitForDeploymentToStabilize(c kubernetes.Interface, ns, name string, timeout time.Duration) error

WaitForDeploymentToStabilize waits till the Deployment has a matching generation/replica count between spec and status.

func WaitForPodReady

func WaitForPodReady(pods corev1.PodInterface, podName string) error

func WaitForPodsWithLabelRunning added in v0.3.0

func WaitForPodsWithLabelRunning(c kubernetes.Interface, ns string, label labels.Selector) error

Wait up to 10 minutes for all matching pods to become Running and at least one matching pod exists.

func WaitForRCToStabilize added in v0.3.0

func WaitForRCToStabilize(c kubernetes.Interface, ns, name string, timeout time.Duration) error

WaitForRCToStabilize waits till the RC has a matching generation/replica count between spec and status.

func WaitForService added in v0.3.0

func WaitForService(c kubernetes.Interface, namespace, name string, exist bool, interval, timeout time.Duration) error

WaitForService waits until the service appears (exist == true), or disappears (exist == false)

func WaitForServiceEndpointsNum added in v0.3.0

func WaitForServiceEndpointsNum(c kubernetes.Interface, namespace, serviceName string, expectNum int, interval, timeout time.Duration) error

WaitForServiceEndpointsNum waits until the amount of endpoints that implement service to expectNum.

Types

type LogAggregator added in v0.3.0

type LogAggregator struct {
	// contains filtered or unexported fields
}

LogAggregator aggregates the logs for all the deployed pods.

func NewLogAggregator added in v0.3.0

func NewLogAggregator(out io.Writer) *LogAggregator

NewLogAggregator creates a new LogAggregator for a given output.

func (*LogAggregator) IsMuted added in v0.3.0

func (a *LogAggregator) IsMuted() bool

IsMuted says if the logs are to be muted.

func (*LogAggregator) Mute added in v0.3.0

func (a *LogAggregator) Mute()

Mute mutes the logs.

func (*LogAggregator) RegisterImage added in v0.3.0

func (a *LogAggregator) RegisterImage(image string, color int)

RegisterImage register an image for which pods need to be logged.

func (*LogAggregator) Start added in v0.3.0

func (a *LogAggregator) Start(ctx context.Context, client corev1.CoreV1Interface) error

func (*LogAggregator) Unmute added in v0.3.0

func (a *LogAggregator) Unmute()

Unmute unmute the logs.

type PodStore added in v0.3.0

type PodStore struct {
	cache.Store

	Reflector *cache.Reflector
	// contains filtered or unexported fields
}

func NewPodStore added in v0.3.0

func NewPodStore(c kubernetes.Interface, namespace string, label labels.Selector, field fields.Selector) *PodStore

nolint: interfacer

func (*PodStore) List added in v0.3.0

func (s *PodStore) List() []*v1.Pod

func (*PodStore) Stop added in v0.3.0

func (s *PodStore) Stop()

Jump to

Keyboard shortcuts

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