kubeutil

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Package e2e contains tests that validate the behavior of gmp-operator against a cluster. To make tests simple and fast, the test suite runs the operator internally. The CRDs are expected to be installed out of band (along with the operator deployment itself in a real world setup).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DaemonSetDebug

func DaemonSetDebug(t testing.TB, ctx context.Context, restConfig *rest.Config, kubeClient client.Client, namespace, name string)

DaemonSetDebug prints the DaemonSetDebug events and pod logs to the test logger.

func DaemonSetPods

func DaemonSetPods(ctx context.Context, kubeClient client.Client, daemonSet *appsv1.DaemonSet) ([]corev1.Pod, error)

func DeploymentContainer

func DeploymentContainer(deployment *appsv1.Deployment, name string) (*corev1.Container, error)

func DeploymentDebug

func DeploymentDebug(t *testing.T, ctx context.Context, restConfig *rest.Config, kubeClient client.Client, namespace, name string)

func DeploymentPods

func DeploymentPods(ctx context.Context, kubeClient client.Client, deployment *appsv1.Deployment) ([]corev1.Pod, error)

func Events

func Events(ctx context.Context, kubeClient client.Client, gvk schema.GroupVersionKind, namespace, name string) ([]string, error)

Events returns the events of the given resource.

func IsPodContainerReady

func IsPodContainerReady(ctx context.Context, restConfig *rest.Config, pod *corev1.Pod, container string) error

func IsPodReady

func IsPodReady(ctx context.Context, restConfig *rest.Config, pod *corev1.Pod) error

func ParseResourceYAML

func ParseResourceYAML(scheme *runtime.Scheme, b []byte) (client.Object, error)

func PodByAddr

func PodByAddr(ctx context.Context, kubeClient client.Client, addr *net.TCPAddr) (*corev1.Pod, string, error)

func PodByIP

func PodByIP(ctx context.Context, kubeClient client.Client, ip net.IP) (*corev1.Pod, error)

func PodLogs

func PodLogs(ctx context.Context, restConfig *rest.Config, namespace, name, container string) (string, error)

PodLogs returns the logs of the pod with the given name.

func PortForwardClient

func PortForwardClient(t testing.TB, restConfig *rest.Config, kubeClient client.Client) (*http.Client, error)

PortForwardClient returns a client that ports-forward all Kubernetes-local HTTP requests to the host.

func ResourceFromFile

func ResourceFromFile(scheme *runtime.Scheme, filepath string) (client.Object, error)

func ResourcesFromFile

func ResourcesFromFile(scheme *runtime.Scheme, filepath string) ([]client.Object, error)

func WaitForDaemonSetReady

func WaitForDaemonSetReady(ctx context.Context, kubeClient client.Client, namespace, name string) error

func WaitForDeploymentReady

func WaitForDeploymentReady(ctx context.Context, kubeClient client.Client, namespace, name string) error

func WaitForPodContainerReady

func WaitForPodContainerReady(ctx context.Context, t testing.TB, restConfig *rest.Config, kubeClient client.Client, pod *corev1.Pod, container string) error

func WaitForPodReady

func WaitForPodReady(ctx context.Context, t *testing.T, restConfig *rest.Config, kubeClient client.Client, pod *corev1.Pod) error

Types

type DelegatingClient

type DelegatingClient interface {
	client.Client
	Base() client.Client
}

func NewLabelWriterClient

func NewLabelWriterClient(c client.Client, labels map[string]string) DelegatingClient

type WriterClient

type WriterClient interface {
	client.Writer
	client.StatusClient
	SubResource(subResource string) client.SubResourceWriter
}

WriterClient comprises of all mutating functions in client.Client.

Jump to

Keyboard shortcuts

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