pod

package
v0.11.0-devel Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodWrapper

type PodWrapper struct {
	corev1.Pod
}

PodWrapper wraps a Pod.

func MakePod

func MakePod(name, ns string) *PodWrapper

MakePod creates a wrapper for a pod with a single container.

func (*PodWrapper) Annotation

func (p *PodWrapper) Annotation(key, content string) *PodWrapper

func (*PodWrapper) Clone

func (p *PodWrapper) Clone() *PodWrapper

Clone returns deep copy of the Pod.

func (*PodWrapper) CreationTimestamp added in v0.6.0

func (p *PodWrapper) CreationTimestamp(t time.Time) *PodWrapper

CreationTimestamp sets a creation timestamp for the pod object

func (*PodWrapper) Delete added in v0.6.0

func (p *PodWrapper) Delete() *PodWrapper

Delete sets a deletion timestamp for the pod object

func (*PodWrapper) DeletionTimestamp added in v0.6.1

func (p *PodWrapper) DeletionTimestamp(t time.Time) *PodWrapper

DeletionTimestamp sets a creation timestamp for the pod object

func (*PodWrapper) Finalizer added in v0.6.0

func (p *PodWrapper) Finalizer(f string) *PodWrapper

Finalizer adds a finalizer to the Pod

func (*PodWrapper) Gate added in v0.9.0

func (p *PodWrapper) Gate(gateName string) *PodWrapper

Gate adds kueue scheduling gate to the Pod by the gate name

func (*PodWrapper) Group added in v0.6.0

func (p *PodWrapper) Group(g string) *PodWrapper

Group updates the pod.GroupNameLabel of the Pod

func (*PodWrapper) GroupIndex added in v0.10.0

func (p *PodWrapper) GroupIndex(index string) *PodWrapper

GroupIndex updates the pod.GroupIndexLabel of the Pod

func (*PodWrapper) GroupTotalCount added in v0.6.0

func (p *PodWrapper) GroupTotalCount(gtc string) *PodWrapper

GroupTotalCount updates the pod.GroupTotalCountAnnotation of the Pod

func (*PodWrapper) Image

func (p *PodWrapper) Image(image string, args []string) *PodWrapper

func (*PodWrapper) KueueFinalizer

func (p *PodWrapper) KueueFinalizer() *PodWrapper

KueueFinalizer adds kueue finalizer to the Pod

func (*PodWrapper) KueueSchedulingGate

func (p *PodWrapper) KueueSchedulingGate() *PodWrapper

KueueSchedulingGate adds kueue scheduling gate to the Pod

func (*PodWrapper) Label

func (p *PodWrapper) Label(k, v string) *PodWrapper

Label sets the label of the Pod

func (*PodWrapper) Limit added in v0.7.0

Limit adds a resource limit to the default container.

func (*PodWrapper) MakeGroup added in v0.6.0

func (p *PodWrapper) MakeGroup(count int) []*corev1.Pod

MakeGroup returns multiple pods that form a pod group, based on the original wrapper.

func (*PodWrapper) MakeIndexedGroup added in v0.10.0

func (p *PodWrapper) MakeIndexedGroup(count int) []*corev1.Pod

MakeIndexedGroup returns multiple indexed pods that form a pod group, based on the original wrapper.

func (*PodWrapper) Name added in v0.6.0

func (p *PodWrapper) Name(n string) *PodWrapper

Name updated the name of the pod

func (*PodWrapper) NodeName added in v0.6.3

func (p *PodWrapper) NodeName(name string) *PodWrapper

NodeName sets a node name to the Pod.

func (*PodWrapper) NodeSelector

func (p *PodWrapper) NodeSelector(k, v string) *PodWrapper

NodeSelector adds a node selector to the Pod.

func (*PodWrapper) Obj

func (p *PodWrapper) Obj() *corev1.Pod

Obj returns the inner Pod.

func (*PodWrapper) OwnerReference

func (p *PodWrapper) OwnerReference(ownerName string, ownerGVK schema.GroupVersionKind) *PodWrapper

OwnerReference adds a ownerReference to the default container.

func (*PodWrapper) PodGroupServingAnnotation added in v0.10.0

func (p *PodWrapper) PodGroupServingAnnotation(enabled bool) *PodWrapper

func (*PodWrapper) PriorityClass added in v0.6.0

func (p *PodWrapper) PriorityClass(pc string) *PodWrapper

PriorityClass updates the priority class name of the Pod

func (*PodWrapper) Queue

func (p *PodWrapper) Queue(q string) *PodWrapper

Queue updates the queue name of the Pod

func (*PodWrapper) Request

func (p *PodWrapper) Request(r corev1.ResourceName, v string) *PodWrapper

Request adds a resource request to the default container.

func (*PodWrapper) RoleHash added in v0.6.0

func (p *PodWrapper) RoleHash(h string) *PodWrapper

RoleHash updates the pod.RoleHashAnnotation of the pod

func (*PodWrapper) StatusConditions

func (p *PodWrapper) StatusConditions(conditions ...corev1.PodCondition) *PodWrapper

StatusConditions updates status conditions of the Pod.

func (*PodWrapper) StatusMessage added in v0.7.0

func (p *PodWrapper) StatusMessage(msg string) *PodWrapper

StatusMessage updates status message of the Pod.

func (*PodWrapper) StatusPhase

func (p *PodWrapper) StatusPhase(ph corev1.PodPhase) *PodWrapper

StatusPhase updates status phase of the Pod.

func (*PodWrapper) TerminationGracePeriod added in v0.8.1

func (p *PodWrapper) TerminationGracePeriod(seconds int64) *PodWrapper

TerminationGracePeriod sets terminationGracePeriodSeconds for the pod object

func (*PodWrapper) TopologySchedulingGate added in v0.9.0

func (p *PodWrapper) TopologySchedulingGate() *PodWrapper

TopologySchedulingGate adds kueue scheduling gate to the Pod

func (*PodWrapper) UID

func (p *PodWrapper) UID(uid string) *PodWrapper

UID updates the uid of the Pod.

func (*PodWrapper) Volume added in v0.6.0

func (p *PodWrapper) Volume(v corev1.Volume) *PodWrapper

Volume adds a new volume for the pod object

Jump to

Keyboard shortcuts

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