kube

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 23 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).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, restConfig *rest.Config, kubeClient client.Client, o client.Object, out io.Writer) error

Debug prints both events and logs of the given resource. Consider passing a new context here in case the original context is cancelled.

func DeploymentComplete

func DeploymentComplete(deployment *appsv1.Deployment, newStatus *appsv1.DeploymentStatus) bool

Copied from https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/deployment/util/deployment_util.go DeploymentComplete considers a deployment to be complete once all of its desired replicas are updated and available, and no old pods are running.

func DeploymentContainer

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

func DeploymentPods

func DeploymentPods(ctx context.Context, kubeClient client.Client, namespace, name string) ([]corev1.Pod, error)

DeploymentPods returns the pods used for the given Deployment.

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 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(restConfig *rest.Config, kubeClient client.Client, out, errOut io.Writer) (*http.Client, error)

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

func ResourceFromYAML

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

func ResourcesFromYAML

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

func WaitForDeploymentReady

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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