pod

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 10 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) Finalizer added in v0.6.0

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

Finalizer adds a finalizer to the Pod

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) 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) MakeGroup added in v0.6.0

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

Group returns multiple 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) 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) ParentWorkload

func (p *PodWrapper) ParentWorkload(parentWorkload string) *PodWrapper

ParentWorkload sets the parent-workload annotation

func (*PodWrapper) PriorityClass added in v0.6.0

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

Queue updates the queue 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) StatusPhase

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

StatusPhase updates status phase of 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