client

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PodObject

func PodObject(podName string, namespace string, label, annotations map[string]string) *corev1.Pod

Types

type E2EClient

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

func New

func New(config *rest.Config) (*E2EClient, error)

func (*E2EClient) AddNamespace

func (c *E2EClient) AddNamespace(name string) (*corev1.Namespace, error)

func (*E2EClient) AddNetAttachDef

func (*E2EClient) AddNetworkToPod

func (c *E2EClient) AddNetworkToPod(pod *corev1.Pod, ifaceConfigsToAdd ...*nettypes.NetworkSelectionElement) error

func (*E2EClient) DelNetAttachDef

func (c *E2EClient) DelNetAttachDef(namespace string, podName string) error

func (*E2EClient) DeleteNamespace

func (c *E2EClient) DeleteNamespace(name string) error

func (*E2EClient) DeletePod

func (c *E2EClient) DeletePod(pod *corev1.Pod) error

func (*E2EClient) ListPods

func (c *E2EClient) ListPods(namespace, selector string) (*corev1.PodList, error)

ListPods returns the list of currently scheduled or running pods in `namespace` with the given selector

func (*E2EClient) NetworkStatus

func (c *E2EClient) NetworkStatus(pod *corev1.Pod) []nettypes.NetworkStatus

func (*E2EClient) ProvisionPod

func (c *E2EClient) ProvisionPod(podName string, namespace string, label, annotations map[string]string) (*corev1.Pod, error)

func (*E2EClient) RemoveNetworkFromPod

func (c *E2EClient) RemoveNetworkFromPod(pod *corev1.Pod, networkName string, namespace string, ifaceToRemove string) error

func (*E2EClient) SetInterfaceNamesOnPodsNetworkSelectionElements

func (c *E2EClient) SetInterfaceNamesOnPodsNetworkSelectionElements(pod *corev1.Pod) error

func (*E2EClient) SetPodNetworks added in v0.3.0

func (c *E2EClient) SetPodNetworks(pod *corev1.Pod, networks ...nettypes.NetworkSelectionElement) error

func (*E2EClient) WaitForPodBySelector

func (c *E2EClient) WaitForPodBySelector(namespace, selector string, timeout time.Duration) error

WaitForPodBySelector waits up to timeout seconds for all pods in 'namespace' with given 'selector' to enter provided state If no pods are found, return nil.

func (*E2EClient) WaitForPodReady

func (c *E2EClient) WaitForPodReady(namespace, podName string, timeout time.Duration) error

WaitForPodReady polls up to timeout seconds for pod to enter steady state (running or succeeded state). Returns an error if the pod never enters a steady state.

func (*E2EClient) WaitForPodToDisappear

func (c *E2EClient) WaitForPodToDisappear(namespace, podName string, timeout time.Duration) error

WaitForPodToDisappear polls up to timeout seconds for pod to be gone from the Kubernetes cluster. Returns an error if the pod is never deleted, or if GETing it returns an error other than `NotFound`.

Jump to

Keyboard shortcuts

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