pods

package
v1.28.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package pods provides pod utilities to manage pods inside K8s

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAndWaitForReady

func CreateAndWaitForReady(
	ctx context.Context,
	crudClient client.Client,
	pod *corev1.Pod,
	timeoutSeconds uint,
) error

CreateAndWaitForReady creates a given pod object and wait for it to be ready

func Delete

func Delete(
	ctx context.Context,
	crudClient client.Client,
	namespace, name string,
	opts ...client.DeleteOption,
) error

Delete deletes a pod if existent

func Get

func Get(
	ctx context.Context,
	crudClient client.Client,
	namespace, podName string,
) (*corev1.Pod, error)

Get gets a pod by namespace and name

func HasAnnotations

func HasAnnotations(pod corev1.Pod, annotations map[string]string) bool

HasAnnotations verifies that the annotations of a pod contain a specified annotations map

func HasCondition

func HasCondition(pod *corev1.Pod, conditionType corev1.PodConditionType, status corev1.ConditionStatus) bool

HasCondition verifies that a pod has a specified condition

func HasLabels

func HasLabels(pod corev1.Pod, labels map[string]string) bool

HasLabels verifies that the labels of a pod contain a specified labels map

func List

func List(
	ctx context.Context,
	crudClient client.Client,
	namespace string,
) (*corev1.PodList, error)

List gathers the current list of pods in a namespace

func Logs

func Logs(
	ctx context.Context,
	kubeInterface kubernetes.Interface,
	namespace, podName string,
) (string, error)

Logs gathers pod logs

Types

This section is empty.

Jump to

Keyboard shortcuts

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