kubernetes

package
v0.0.0-...-8e01d1d Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientset

func GetClientset() (kubernetes.Interface, error)

func IsRetryableAPIError

func IsRetryableAPIError(err error) bool

func StartPods

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

func WaitForDeploymentToStabilize

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 WaitForPodComplete

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

func WaitForPodReady

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

func WaitForPodsWithLabelRunning

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

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

func WaitForRCToStabilize

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 WaitForReplicaSetToStabilize

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

WaitForReplicaSetToStabilize waits till the ReplicaSet has a matching generation/replica count between spec and status.

func WaitForService

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

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 PodStore

type PodStore struct {
	cache.Store

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

func NewPodStore

func NewPodStore(c kubernetes.Interface, namespace string, label fmt.Stringer, field fmt.Stringer) *PodStore

func (*PodStore) List

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

func (*PodStore) Stop

func (s *PodStore) Stop()

Jump to

Keyboard shortcuts

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