test

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPodConditionReady

func IsPodConditionReady(pod *corev1.Pod, conditionType corev1.PodConditionType) bool

IsPodConditionReady returns true if the pod condition is ready

Types

type CurlFromPod

type CurlFromPod struct {
	Url            string
	Cluster        *KubeContext
	Method         string
	Data           string
	App            string
	Namespace      string
	Verbose        bool
	Headers        []string
	TimeoutSeconds float32
	// Container from which curl is executed, defaults to "curl"
	Container string
}

func (*CurlFromPod) Execute

func (c *CurlFromPod) Execute() (string, error)

type KubeContext

type KubeContext struct {
	Context string
	// contains filtered or unexported fields
}

func NewKubeContext

func NewKubeContext(kubeCtx string) (*KubeContext, error)

func (*KubeContext) CheckPodsInCluster

func (k *KubeContext) CheckPodsInCluster(ctx context.Context)

func (*KubeContext) GetPod

func (k *KubeContext) GetPod(ctx context.Context, ns string, labelSelector map[string]string) (*Pod, error)

func (*KubeContext) GetPods

func (k *KubeContext) GetPods(ctx context.Context, ns string, labelSelector map[string]string) ([]*Pod, error)

type Pod

type Pod struct {
	corev1.Pod
	Cluster *KubeContext
}

func (*Pod) Curl

func (p *Pod) Curl(ctx context.Context, container string, args ...string) (string, error)

Curl requires a container named 'curl' to exist on the deployment

Directories

Path Synopsis
utils

Jump to

Keyboard shortcuts

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