pod

package
v0.0.0-...-22d9994 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PauseImage = "registry.k8s.io/pause"
)

Variables

This section is empty.

Functions

func BestEffortSleeper

func BestEffortSleeper() *corev1.Pod

BestEffortSleeper makes a Best Effort QoS class Pod object which sleeps long enough

func DeleteAsync

func DeleteAsync(ctx context.Context, f *framework.Framework, podMap map[string]*corev1.Pod)

DeleteAsync concurrently deletes all the pods in the given name:pod_object mapping. Returns when the longer operation ends.

func DeleteSyncByName

func DeleteSyncByName(ctx context.Context, f *framework.Framework, podName string)

DeleteSyncByName deletes the pod identified by `podName` in the current namespace

func GuaranteedSleeper

func GuaranteedSleeper(opts ...func(pod *corev1.Pod)) *corev1.Pod

GuaranteedSleeper makes a Guaranteed QoS class Pod object which long enough forever but requires `cpuLimit` exclusive CPUs.

func NFDGCSpec

func NFDGCSpec(opts ...SpecOption) *corev1.PodSpec

func NFDMaster

func NFDMaster(opts ...SpecOption) *corev1.Pod

NFDMaster provide NFD master pod definition

func NFDTopologyUpdaterSpec

func NFDTopologyUpdaterSpec(kc utils.KubeletConfig, opts ...SpecOption) *corev1.PodSpec

func NFDWorker

func NFDWorker(opts ...SpecOption) *corev1.Pod

NFDWorker provides NFD worker pod definition

func WaitForReady

func WaitForReady(ctx context.Context, c clientset.Interface, ns, name string, minReadySeconds int) error

WaitForReady waits for the pods to become ready. NOTE: copied from k8s v1.22 after which is was removed from there. Convenient for checking that all pods of a daemonset are ready.

func WithLimits

func WithLimits(list corev1.ResourceList) func(p *corev1.Pod)

Types

type SpecOption

type SpecOption func(spec *corev1.PodSpec)

func SpecWithConfigMap

func SpecWithConfigMap(name, mountPath string) SpecOption

SpecWithConfigMap returns a SpecOption that mounts a configmap to the first container.

func SpecWithContainerExtraArgs

func SpecWithContainerExtraArgs(args ...string) SpecOption

SpecWithContainerExtraArgs returns a SpecOption that adds extra args to the first container.

func SpecWithContainerImage

func SpecWithContainerImage(image string) SpecOption

SpecWithContainerImage returns a SpecOption that sets the image used by the first container.

func SpecWithMasterNodeSelector

func SpecWithMasterNodeSelector(args ...string) SpecOption

SpecWithMasterNodeSelector returns a SpecOption that modifies the pod to be run on a control plane node of the cluster.

func SpecWithRestartPolicy

func SpecWithRestartPolicy(restartpolicy corev1.RestartPolicy) SpecOption

SpecWithRestartPolicy returns a SpecOption that sets the pod restart policy

func SpecWithTolerations

func SpecWithTolerations(tolerations []corev1.Toleration) SpecOption

SpecWithTolerations returns a SpecOption that modifies the pod to be run on a node with NodeFeatureRule taints.

Jump to

Keyboard shortcuts

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